From 907efd92c9784e46aef717a1b4229a475cfd3879 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 20 Oct 2020 17:01:53 +0800 Subject: [PATCH] let balancer to be customizable --- zrpc/internal/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zrpc/internal/client.go b/zrpc/internal/client.go index 9936d019..8528b9f8 100644 --- a/zrpc/internal/client.go +++ b/zrpc/internal/client.go @@ -38,7 +38,7 @@ type ( func NewClient(target string, opts ...ClientOption) (*client, error) { var cli client - opts = append(opts, WithDialOption(grpc.WithBalancerName(p2c.Name))) + opts = append([]ClientOption{WithDialOption(grpc.WithBalancerName(p2c.Name))}, opts...) if err := cli.dial(target, opts...); err != nil { return nil, err }