diff --git a/etcd/add_child.go b/etcd/add_child.go index 7122be0..377cd9c 100644 --- a/etcd/add_child.go +++ b/etcd/add_child.go @@ -1,6 +1,6 @@ package etcd -// Add a new directory with a random etcd-generated key under the given path. +// AddChildDir adds a new directory with a random etcd-generated key under the given path. func (c *Client) AddChildDir(key string, ttl uint64) (*Response, error) { raw, err := c.post(key, "", ttl) @@ -11,7 +11,7 @@ func (c *Client) AddChildDir(key string, ttl uint64) (*Response, error) { return raw.Unmarshal() } -// Add a new file with a random etcd-generated key under the given path. +// AddChild adds a new file with a random etcd-generated key under the given path. func (c *Client) AddChild(key string, value string, ttl uint64) (*Response, error) { raw, err := c.post(key, value, ttl) diff --git a/etcd/client.go b/etcd/client.go index 60ed762..24e22aa 100644 --- a/etcd/client.go +++ b/etcd/client.go @@ -174,7 +174,7 @@ func NewClientFromReader(reader io.Reader) (*Client, error) { return c, nil } -// Override the Client's HTTP Transport object +// SetTransport: Override the Client's HTTP Transport object func (c *Client) SetTransport(tr *http.Transport) { c.httpClient.Transport = tr c.transport = tr @@ -252,7 +252,7 @@ func (c *Client) SetConsistency(consistency string) error { return nil } -// Sets the DialTimeout value +// SetDialTimeout: Sets the DialTimeout value func (c *Client) SetDialTimeout(d time.Duration) { c.config.DialTimeout = d } diff --git a/etcd/response.go b/etcd/response.go index 69b38be..6c6ffb5 100644 --- a/etcd/response.go +++ b/etcd/response.go @@ -79,7 +79,7 @@ type Node struct { type Nodes []*Node -// interfaces for sorting +// Len: interfaces for sorting func (ns Nodes) Len() int { return len(ns) } diff --git a/etcd/watch.go b/etcd/watch.go index aa8d3df..c570b0c 100644 --- a/etcd/watch.go +++ b/etcd/watch.go @@ -9,7 +9,7 @@ var ( ErrWatchStoppedByUser = errors.New("Watch stopped by the user via stop channel") ) -// If recursive is set to true the watch returns the first change under the given +// Watch: If recursive is set to true the watch returns the first change under the given // prefix since the given index. // // If recursive is set to false the watch returns the first change to the given key