Browse Source

clientv3/doc: update dial-timeout error handling with new gRPC

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 8 years ago
parent
commit
6b6013fad5
1 changed files with 7 additions and 0 deletions
  1. 7 0
      clientv3/doc.go

+ 7 - 0
clientv3/doc.go

@@ -21,6 +21,13 @@
 //		Endpoints:   []string{"http://254.0.0.1:12345"},
 //		Endpoints:   []string{"http://254.0.0.1:12345"},
 //		DialTimeout: 2 * time.Second
 //		DialTimeout: 2 * time.Second
 //	})
 //	})
+//
+//	// etcd clientv3 >= v3.2.10, grpc/grpc-go >= v1.7.3
+//	if err == context.DeadlineExceeded {
+//		// handle errors
+//	}
+//
+//	// etcd clientv3 <= v3.2.9, grpc/grpc-go <= v1.2.1
 //	if err == grpc.ErrClientConnTimeout {
 //	if err == grpc.ErrClientConnTimeout {
 //		// handle errors
 //		// handle errors
 //	}
 //	}