update for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-01-29 16:12:28 +03:00
parent db1148c1d1
commit 0fe6470260
3 changed files with 26 additions and 335 deletions

10
grpc.go
View File

@@ -652,6 +652,10 @@ func (g *grpcClient) String() string {
return "grpc"
}
func (g *grpcClient) Name() string {
return g.opts.Name
}
func (g *grpcClient) getGrpcDialOptions() []grpc.DialOption {
if g.opts.CallOptions.Context == nil {
return nil
@@ -692,7 +696,7 @@ func (g *grpcClient) getGrpcCallOptions() []grpc.CallOption {
return opts
}
func newClient(opts ...client.Option) client.Client {
func NewClient(opts ...client.Option) client.Client {
options := client.NewOptions(opts...)
// default content type for grpc
options.ContentType = "application/grpc+proto"
@@ -724,7 +728,3 @@ func newClient(opts ...client.Option) client.Client {
return c
}
func NewClient(opts ...client.Option) client.Client {
return newClient(opts...)
}