mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-02 16:28:39 +08:00
let balancer to be customizable
This commit is contained in:
parent
737cd4751a
commit
907efd92c9
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user