Skip to content

Commit

Permalink
extend (wrongly used) interface to allow injecting interceptors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjarosch committed Jun 26, 2020
1 parent dc461ef commit 4e44fb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Gateway interface {
HttpMux() *runtime.ServeMux
GrpcDialOpts() []grpc.DialOption
Context() context.Context
DialOptsWithUnaryInterceptors(interceptors ...grpc.UnaryClientInterceptor) []grpc.DialOption
}

func NewGateway(ctx context.Context, options ...Option) Gateway {
Expand All @@ -52,9 +53,9 @@ func NewGateway(ctx context.Context, options ...Option) Gateway {
mux := runtime.NewServeMux(serveMuxOpts...)

gw := &gateway{
ctx: ctx,
mux: mux,
opts: opts,
ctx: ctx,
mux: mux,
opts: opts,
}
gw.dialOptions = gw.dialWithOpts(dialOpts, unaryInterceptors)

Expand Down

0 comments on commit 4e44fb8

Please sign in to comment.