Versions in this module Expand all Collapse all v0 v0.4.6 Dec 31, 2014 Changes in this version + const ErrCodeEtcdNotReachable + const STRONG_CONSISTENCY + const WEAK_CONSISTENCY + var ErrRequestCancelled = errors.New("sending request is cancelled") + var ErrWatchStoppedByUser = errors.New("Watch stopped by the user via stop channel") + var VALID_DELETE_OPTIONS = validOptions + var VALID_GET_OPTIONS = validOptions + var VALID_POST_OPTIONS = validOptions + var VALID_PUT_OPTIONS = validOptions + func DefaultCheckRetry(cluster *Cluster, numReqs int, lastResp http.Response, err error) error + func GetLogger() *log.Logger + func SetLogger(l *log.Logger) + type Client struct + CheckRetry func(cluster *Cluster, numReqs int, lastResp http.Response, err error) error + func NewClient(machines []string) *Client + func NewClientFromFile(fpath string) (*Client, error) + func NewClientFromReader(reader io.Reader) (*Client, error) + func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) + func (c *Client) AddChild(key string, value string, ttl uint64) (*Response, error) + func (c *Client) AddChildDir(key string, ttl uint64) (*Response, error) + func (c *Client) AddRootCA(caCert string) error + func (c *Client) CloseCURL() + func (c *Client) CompareAndDelete(key string, prevValue string, prevIndex uint64) (*Response, error) + func (c *Client) CompareAndSwap(key string, value string, ttl uint64, prevValue string, prevIndex uint64) (*Response, error) + func (c *Client) Create(key string, value string, ttl uint64) (*Response, error) + func (c *Client) CreateDir(key string, ttl uint64) (*Response, error) + func (c *Client) CreateInOrder(dir string, value string, ttl uint64) (*Response, error) + func (c *Client) Delete(key string, recursive bool) (*Response, error) + func (c *Client) DeleteDir(key string) (*Response, error) + func (c *Client) Get(key string, sort, recursive bool) (*Response, error) + func (c *Client) GetCluster() []string + func (c *Client) MarshalJSON() ([]byte, error) + func (c *Client) OpenCURL() + func (c *Client) RawCompareAndDelete(key string, prevValue string, prevIndex uint64) (*RawResponse, error) + func (c *Client) RawCompareAndSwap(key string, value string, ttl uint64, prevValue string, prevIndex uint64) (*RawResponse, error) + func (c *Client) RawCreate(key string, value string, ttl uint64) (*RawResponse, error) + func (c *Client) RawCreateDir(key string, ttl uint64) (*RawResponse, error) + func (c *Client) RawCreateInOrder(dir string, value string, ttl uint64) (*RawResponse, error) + func (c *Client) RawDelete(key string, recursive bool, dir bool) (*RawResponse, error) + func (c *Client) RawGet(key string, sort, recursive bool) (*RawResponse, error) + func (c *Client) RawSet(key string, value string, ttl uint64) (*RawResponse, error) + func (c *Client) RawSetDir(key string, ttl uint64) (*RawResponse, error) + func (c *Client) RawUpdate(key string, value string, ttl uint64) (*RawResponse, error) + func (c *Client) RawUpdateDir(key string, ttl uint64) (*RawResponse, error) + func (c *Client) RawWatch(prefix string, waitIndex uint64, recursive bool, receiver chan *RawResponse, ...) (*RawResponse, error) + func (c *Client) RecvCURL() string + func (c *Client) SendRequest(rr *RawRequest) (*RawResponse, error) + func (c *Client) Set(key string, value string, ttl uint64) (*Response, error) + func (c *Client) SetCluster(machines []string) bool + func (c *Client) SetConsistency(consistency string) error + func (c *Client) SetDialTimeout(d time.Duration) + func (c *Client) SetDir(key string, ttl uint64) (*Response, error) + func (c *Client) SetPersistence(writer io.Writer) + func (c *Client) SetTransport(tr *http.Transport) + func (c *Client) SyncCluster() bool + func (c *Client) UnmarshalJSON(b []byte) error + func (c *Client) Update(key string, value string, ttl uint64) (*Response, error) + func (c *Client) UpdateDir(key string, ttl uint64) (*Response, error) + func (c *Client) Watch(prefix string, waitIndex uint64, recursive bool, receiver chan *Response, ...) (*Response, error) + type Cluster struct + Leader string + Machines []string + func NewCluster(machines []string) *Cluster + type Config struct + CaCertFile []string + CertFile string + Consistency string + DialTimeout time.Duration + KeyFile string + type EtcdError struct + Cause string + ErrorCode int + Index uint64 + Message string + func (e EtcdError) Error() string + type Node struct + CreatedIndex uint64 + Dir bool + Expiration *time.Time + Key string + ModifiedIndex uint64 + Nodes Nodes + TTL int64 + Value string + type Nodes []*Node + func (ns Nodes) Len() int + func (ns Nodes) Less(i, j int) bool + func (ns Nodes) Swap(i, j int) + type Options map[string]interface + type RawRequest struct + Cancel <-chan bool + Method string + RelativePath string + Values url.Values + func NewRawRequest(method, relativePath string, values url.Values, cancel <-chan bool) *RawRequest + type RawResponse struct + Body []byte + Header http.Header + StatusCode int + func (rr *RawResponse) Unmarshal() (*Response, error) + type Response struct + Action string + EtcdIndex uint64 + Node *Node + PrevNode *Node + RaftIndex uint64 + RaftTerm uint64 v0.2.0-rc1 Nov 14, 2013 Incompatible versions in this module v2.0.0+incompatible Apr 16, 2015