Documentation ¶
Index ¶
- Constants
- func IsKeyNotFound(err error) bool
- func IsNodeExist(err error) bool
- func NewClient(endpoints []string, transport *http.Transport, actionTimeout time.Duration) (*client, error)
- type Action
- type Client
- type Create
- type Delete
- type Error
- type Get
- type LeaseManager
- func (r *LeaseManager) AcquireLease(name string, machID string, ver int, period time.Duration) (lease.Lease, error)
- func (r *LeaseManager) GetLease(name string) (lease.Lease, error)
- func (r *LeaseManager) StealLease(name, machID string, ver int, period time.Duration, idx uint64) (lease.Lease, error)
- type Node
- type Nodes
- type Result
- type Set
- type Update
- type Watch
Constants ¶
View Source
const ( ErrorKeyNotFound = 100 ErrorNodeExist = 105 ErrorEventIndexCleared = 401 )
Variables ¶
This section is empty.
Functions ¶
func IsKeyNotFound ¶ added in v0.10.0
func IsNodeExist ¶ added in v0.10.0
Types ¶
type Delete ¶ added in v0.5.1
TODO(bcwaldon): Should Delete be separate from CompareAndDelete?
func (*Delete) HTTPRequest ¶ added in v0.5.1
type Error ¶ added in v0.5.1
type LeaseManager ¶ added in v0.10.0
type LeaseManager struct {
// contains filtered or unexported fields
}
func NewLeaseManager ¶ added in v0.10.0
func NewLeaseManager(client Client, keyPrefix string) *LeaseManager
func (*LeaseManager) AcquireLease ¶ added in v0.10.0
type Node ¶ added in v0.5.1
type Node struct { Key string `json:"key"` Value string `json:"value"` TTL int `json:"ttl"` Nodes Nodes `json:"nodes"` ModifiedIndex uint64 `json:"modifiedIndex"` CreatedIndex uint64 `json:"createdIndex"` }
func (Node) TTLDuration ¶ added in v0.8.2
type Result ¶ added in v0.5.1
type Set ¶ added in v0.5.1
Click to show internal directories.
Click to hide internal directories.