mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpc_naming.md: improve docs invoke grpc naming by balance
This commit is contained in:
parent
b989e1992f
commit
2ee9f0f95b
@ -19,7 +19,7 @@ import (
|
||||
cli, cerr := clientv3.NewFromURL("http://localhost:2379")
|
||||
r := &etcdnaming.GRPCResolver{Client: cli}
|
||||
b := grpc.RoundRobin(r)
|
||||
conn, gerr := grpc.Dial("my-service", grpc.WithBalancer(b))
|
||||
conn, gerr := grpc.Dial("my-service", grpc.WithBalancer(b), grpc.WithBlock(), ...)
|
||||
```
|
||||
|
||||
## Managing service endpoints
|
||||
|
Loading…
x
Reference in New Issue
Block a user