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 v1.12.0
func IsNodeExist ¶ added in v1.12.0
Types ¶
type Error ¶
type LeaseManager ¶ added in v1.12.0
type LeaseManager struct {
// contains filtered or unexported fields
}
func NewLeaseManager ¶ added in v1.12.0
func NewLeaseManager(client Client, keyPrefix string) *LeaseManager
func (*LeaseManager) AcquireLease ¶ added in v1.12.0
type Node ¶
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 ¶
type Result ¶
type Set ¶
Click to show internal directories.
Click to hide internal directories.