package client
import "github.com/coreos/etcd/client"
Index ¶
- Variables
- type HTTPKeysAPI
- func (k *HTTPKeysAPI) Create(key, val string, ttl time.Duration) (*Response, error)
- func (k *HTTPKeysAPI) Get(key string) (*Response, error)
- func (k *HTTPKeysAPI) RecursiveWatch(key string, idx uint64) Watcher
- func (k *HTTPKeysAPI) Watch(key string, idx uint64) Watcher
- type KeysAPI
- func NewDiscoveryKeysAPI(tr *http.Transport, ep string, to time.Duration) (KeysAPI, error)
- func NewKeysAPI(tr *http.Transport, ep string, to time.Duration) (KeysAPI, error)
- type Node
- type Nodes
- type Response
- type Watcher
Variables ¶
var ( ErrTimeout = context.DeadlineExceeded DefaultRequestTimeout = 5 * time.Second )
var ( errors.New("client: no available etcd endpoints") ErrNoLeader = errors.New("client: no leader") ErrKeyNoExist = errors.New("client: key does not exist") ErrKeyExists = errors.New("client: key already exists") )=
var (
DefaultV2KeysPrefix = "/v2/keys"
)
Types ¶
type HTTPKeysAPI ¶
type HTTPKeysAPI struct {
// contains filtered or unexported fields
}
func (*HTTPKeysAPI) Create ¶
func (*HTTPKeysAPI) Get ¶
func (k *HTTPKeysAPI) Get(key string) (*Response, error)
func (*HTTPKeysAPI) RecursiveWatch ¶
func (k *HTTPKeysAPI) RecursiveWatch(key string, idx uint64) Watcher
func (*HTTPKeysAPI) Watch ¶
func (k *HTTPKeysAPI) Watch(key string, idx uint64) Watcher
type KeysAPI ¶
type KeysAPI interface { Create(key, value string, ttl time.Duration) (*Response, error) Get(key string) (*Response, error) Watch(key string, idx uint64) Watcher RecursiveWatch(key string, idx uint64) Watcher }
func NewDiscoveryKeysAPI ¶
func NewKeysAPI ¶
type Node ¶
type Node struct { Key string `json:"key"` Value string `json:"value"` Nodes Nodes `json:"nodes"` ModifiedIndex uint64 `json:"modifiedIndex"` CreatedIndex uint64 `json:"createdIndex"` }
func (*Node) String ¶
type Nodes ¶
type Nodes []*Node
type Response ¶
type Response struct { Action string `json:"action"` Node *Node `json:"node"` PrevNode *Node `json:"prevNode"` }
type Watcher ¶
Source Files ¶
- Version
- v0.5.0-alpha.0
- Published
- Oct 25, 2014
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 26 minutes ago –
Tools for package owners.