Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 0 additions & 110 deletions grpc-gateway/Gopkg.lock

This file was deleted.

50 changes: 0 additions & 50 deletions grpc-gateway/Gopkg.toml

This file was deleted.

5 changes: 1 addition & 4 deletions grpc-gateway/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
.PHONY: prepare build proto
.PHONY: build proto

REGISTRY_DOMAIN := jun06t

prepare:
dep ensure -v

build:
docker build -f Dockerfile-gateway -t ${REGISTRY_DOMAIN}/grpc-gateway:latest .
docker build -f Dockerfile-grpc -t ${REGISTRY_DOMAIN}/grpc-backend:latest .
Expand Down
5 changes: 3 additions & 2 deletions grpc-gateway/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/runtime"
pb "github.com/jun06t/grpc-sample/grpc-gateway/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

var (
Expand All @@ -26,10 +27,10 @@ func init() {

func newGateway(ctx context.Context, opts ...runtime.ServeMuxOption) (http.Handler, error) {
mux := runtime.NewServeMux(opts...)
dialOpts := []grpc.DialOption{grpc.WithInsecure()}
dialOpts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}

fmt.Println("Endpoint: ", endpoint)
conn, err := grpc.Dial(endpoint, dialOpts...)
conn, err := grpc.NewClient(endpoint, dialOpts...)
if err != nil {
return nil, err
}
Expand Down
Loading