Browse Source

clientv3: fix client for grpc change

Fix https://github.com/coreos/etcd/issues/5638.
Gyu-Ho Lee 9 years ago
parent
commit
5225a4e4bc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      clientv3/client.go

+ 3 - 3
clientv3/client.go

@@ -48,7 +48,7 @@ type Client struct {
 
 
 	conn  *grpc.ClientConn
 	conn  *grpc.ClientConn
 	cfg   Config
 	cfg   Config
-	creds *credentials.TransportAuthenticator
+	creds *credentials.TransportCredentials
 
 
 	ctx    context.Context
 	ctx    context.Context
 	cancel context.CancelFunc
 	cancel context.CancelFunc
@@ -110,7 +110,7 @@ func (cred authTokenCredential) GetRequestMetadata(ctx context.Context, s ...str
 	}, nil
 	}, nil
 }
 }
 
 
-func (c *Client) dialTarget(endpoint string) (proto string, host string, creds *credentials.TransportAuthenticator) {
+func (c *Client) dialTarget(endpoint string) (proto string, host string, creds *credentials.TransportCredentials) {
 	proto = "tcp"
 	proto = "tcp"
 	host = endpoint
 	host = endpoint
 	creds = c.creds
 	creds = c.creds
@@ -220,7 +220,7 @@ func newClient(cfg *Config) (*Client, error) {
 	if cfg == nil {
 	if cfg == nil {
 		cfg = &Config{}
 		cfg = &Config{}
 	}
 	}
-	var creds *credentials.TransportAuthenticator
+	var creds *credentials.TransportCredentials
 	if cfg.TLS != nil {
 	if cfg.TLS != nil {
 		c := credentials.NewTLS(cfg.TLS)
 		c := credentials.NewTLS(cfg.TLS)
 		creds = &c
 		creds = &c