diff --git a/etcd/README.md b/etcd/README.md index 44dbb51a..752a0c10 100644 --- a/etcd/README.md +++ b/etcd/README.md @@ -51,10 +51,15 @@ store := etcd.New(Config{ ### Config ```go type Config struct { + // Endpoints is a list of URLs. Endpoints []string + // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration + // Username is a username for authentication. Username string + // Password is a password for authentication. Password string + // Context is the context for the client. Context context.Context } ``` diff --git a/etcd/config.go b/etcd/config.go index ceaa3d76..fb17673d 100644 --- a/etcd/config.go +++ b/etcd/config.go @@ -7,11 +7,16 @@ import ( // Config defines the config for storage. type Config struct { - Endpoints []string + // Endpoints is a list of URLs. + Endpoints []string + // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration - Username string - Password string - Context context.Context + // Username is a username for authentication. + Username string + // Password is a password for authentication. + Password string + // Context is the context for the client. + Context context.Context } // ConfigDefault is the default config