Versions in this module Expand all Collapse all v0 v0.12.0 Apr 15, 2016 Changes in this version + const ErrorCodeUnauthorized + var ErrClusterUnavailable = errors.New("client: etcd cluster is unavailable or misconfigured") + var ErrEmptyBody = errors.New("client: response body is empty") type Client + AutoSync func(context.Context, time.Duration) error + type ClusterError struct + Errors []error + func (ce *ClusterError) Detail() string + func (ce *ClusterError) Error() string type Config + HeaderTimeoutPerRequest time.Duration v0.11.8 Aug 10, 2016 v0.11.7 Apr 5, 2016 v0.11.6 Apr 5, 2016 v0.11.5 Aug 20, 2015 v0.11.4 Aug 14, 2015 v0.11.3 Aug 12, 2015 v0.11.2 Jul 23, 2015 Changes in this version + var ErrInvalidJSON = errors.New(...) + type AuthAPI interface + Disable func(ctx context.Context) error + Enable func(ctx context.Context) error + func NewAuthAPI(c Client) AuthAPI + type AuthRoleAPI interface + AddRole func(ctx context.Context, role string) error + GetRole func(ctx context.Context, role string) (*Role, error) + GrantRoleKV func(ctx context.Context, role string, prefixes []string, permType PermissionType) (*Role, error) + ListRoles func(ctx context.Context) ([]string, error) + RemoveRole func(ctx context.Context, role string) error + RevokeRoleKV func(ctx context.Context, role string, prefixes []string, permType PermissionType) (*Role, error) + func NewAuthRoleAPI(c Client) AuthRoleAPI + type AuthUserAPI interface + AddUser func(ctx context.Context, username string, password string) error + ChangePassword func(ctx context.Context, username string, password string) (*User, error) + GetUser func(ctx context.Context, username string) (*User, error) + GrantUser func(ctx context.Context, username string, roles []string) (*User, error) + ListUsers func(ctx context.Context) ([]string, error) + RemoveUser func(ctx context.Context, username string) error + RevokeUser func(ctx context.Context, username string, roles []string) (*User, error) + func NewAuthUserAPI(c Client) AuthUserAPI type Config + Password string + Username string type DeleteOptions + Dir bool type GetOptions + Quorum bool type MembersAPI + Update func(ctx context.Context, mID string, peerURLs []string) error + type PermissionType int + const ReadPermission + const ReadWritePermission + const WritePermission + type Permissions struct + KV rwPermission + type Role struct + Grant *Permissions + Permissions Permissions + Revoke *Permissions + Role string + type User struct + Grant []string + Password string + Revoke []string + Roles []string + User string v0.11.1 Jul 10, 2015 v0.11.0 Jul 3, 2015 Changes in this version + const ErrorCodeDirNotEmpty + const ErrorCodeEventIndexCleared + const ErrorCodeIndexNaN + const ErrorCodeInvalidField + const ErrorCodeInvalidForm + const ErrorCodeKeyNotFound + const ErrorCodeLeaderElect + const ErrorCodeNodeExist + const ErrorCodeNotDir + const ErrorCodeNotFile + const ErrorCodePrevValueRequired + const ErrorCodeRaftInternal + const ErrorCodeRootROnly + const ErrorCodeTTLNaN + const ErrorCodeTestFailed + const ErrorCodeWatcherCleared + const PrevExist + const PrevIgnore + const PrevNoExist + var DefaultRequestTimeout = 5 * time.Second + var ErrNoEndpoints = errors.New("client: no endpoints available") + var ErrTooManyRedirects = errors.New("client: too many redirects") + func DisablecURLDebug() + func EnablecURLDebug() + type CancelableTransport interface + CancelRequest func(req *http.Request) + var DefaultTransport CancelableTransport = &http.Transport{ ... } + type CheckRedirectFunc func(via int) error + var DefaultCheckRedirect CheckRedirectFunc = func(via int) error { ... } + type Client interface + Endpoints func() []string + Sync func(context.Context) error + func New(cfg Config) (Client, error) + type Config struct + CheckRedirect CheckRedirectFunc + Endpoints []string + Transport CancelableTransport + type CreateInOrderOptions struct + TTL time.Duration + type DeleteOptions struct + PrevIndex uint64 + PrevValue string + Recursive bool + type Discoverer interface + Discover func(domain string) ([]string, error) + func NewSRVDiscover() Discoverer + type Error struct + Cause string + Code int + Index uint64 + Message string + func (e Error) Error() string + type GetOptions struct + Recursive bool + Sort bool + type KeysAPI interface + Create func(ctx context.Context, key, value string) (*Response, error) + CreateInOrder func(ctx context.Context, dir, value string, opts *CreateInOrderOptions) (*Response, error) + Delete func(ctx context.Context, key string, opts *DeleteOptions) (*Response, error) + Get func(ctx context.Context, key string, opts *GetOptions) (*Response, error) + Set func(ctx context.Context, key, value string, opts *SetOptions) (*Response, error) + Update func(ctx context.Context, key, value string) (*Response, error) + Watcher func(key string, opts *WatcherOptions) Watcher + func NewKeysAPI(c Client) KeysAPI + func NewKeysAPIWithPrefix(c Client, p string) KeysAPI + type Member struct + ClientURLs []string + ID string + Name string + PeerURLs []string + type MembersAPI interface + Add func(ctx context.Context, peerURL string) (*Member, error) + List func(ctx context.Context) ([]Member, error) + Remove func(ctx context.Context, mID string) error + func NewMembersAPI(c Client) MembersAPI + type Node struct + CreatedIndex uint64 + Dir bool + Expiration *time.Time + Key string + ModifiedIndex uint64 + Nodes []*Node + TTL int64 + Value string + func (n *Node) String() string + func (n *Node) TTLDuration() time.Duration + type PrevExistType string + type Response struct + Action string + Index uint64 + Node *Node + PrevNode *Node + type SetOptions struct + Dir bool + PrevExist PrevExistType + PrevIndex uint64 + PrevValue string + TTL time.Duration + type Watcher interface + Next func(context.Context) (*Response, error) + type WatcherOptions struct + AfterIndex uint64 + Recursive bool