mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdmain, proxy: support authed RPCs with grpcproxy
This commit lets grpcproxy support authed RPCs. Auth tokens supplied by clients are now forwarded to etcdserver by grpcproxy.
This commit is contained in:
committed by
Hitoshi Mitake
parent
aca8a0d5b9
commit
e709f83253
@@ -204,6 +204,8 @@ func mustNewClient() *clientv3.Client {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
cfg.DialOptions = append(cfg.DialOptions,
|
||||
grpc.WithUnaryInterceptor(grpcproxy.AuthUnaryClientInterceptor))
|
||||
client, err := clientv3.New(*cfg)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
||||
Reference in New Issue
Block a user