Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
603b855e2a | |||
f2cfd562c3 | |||
781cf3d719 | |||
1b65507fe5 |
13
go.mod
13
go.mod
@@ -1,8 +1,17 @@
|
||||
module go.unistack.org/micro-client-grpc/v3
|
||||
|
||||
go 1.16
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
go.unistack.org/micro/v3 v3.10.22
|
||||
google.golang.org/grpc v1.52.3
|
||||
google.golang.org/grpc v1.55.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
golang.org/x/net v0.8.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
)
|
||||
|
3
grpc.go
3
grpc.go
@@ -118,6 +118,9 @@ func (g *grpcClient) call(ctx context.Context, addr string, req client.Request,
|
||||
),
|
||||
}
|
||||
|
||||
if opts := g.getGrpcDialOptions(g.opts.Context); opts != nil {
|
||||
grpcDialOptions = append(grpcDialOptions, opts...)
|
||||
}
|
||||
if opts := g.getGrpcDialOptions(opts.Context); opts != nil {
|
||||
grpcDialOptions = append(grpcDialOptions, opts...)
|
||||
}
|
||||
|
@@ -95,8 +95,8 @@ func MaxSendMsgSize(s int) client.Option {
|
||||
type grpcDialOptions struct{}
|
||||
|
||||
// DialOptions to be used to configure gRPC dial options
|
||||
func DialOptions(opts ...grpc.DialOption) client.CallOption {
|
||||
return func(o *client.CallOptions) {
|
||||
func DialOptions(opts ...grpc.DialOption) client.Option {
|
||||
return func(o *client.Options) {
|
||||
if o.Context == nil {
|
||||
o.Context = context.Background()
|
||||
}
|
||||
|
Reference in New Issue
Block a user