Browse Source

clientv3: document "WithBlock" dial option

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Gyuho Lee 6 years ago
parent
commit
4b0af5b4ac
1 changed files with 2 additions and 0 deletions
  1. 2 0
      clientv3/config.go

+ 2 - 0
clientv3/config.go

@@ -68,6 +68,8 @@ type Config struct {
 	RejectOldCluster bool `json:"reject-old-cluster"`
 	RejectOldCluster bool `json:"reject-old-cluster"`
 
 
 	// DialOptions is a list of dial options for the grpc client (e.g., for interceptors).
 	// DialOptions is a list of dial options for the grpc client (e.g., for interceptors).
+	// For example, pass "grpc.WithBlock()" to block until the underlying connection is up.
+	// Without this, Dial returns immediately and connecting the server happens in background.
 	DialOptions []grpc.DialOption
 	DialOptions []grpc.DialOption
 
 
 	// Context is the default client context; it can be used to cancel grpc dial out and
 	// Context is the default client context; it can be used to cancel grpc dial out and