Documentation
¶
Index ¶
Constants ¶
View Source
const ( Get = "get" Create = "create" Set = "set" Update = "update" Delete = "delete" CompareAndSwap = "compareAndSwap" CompareAndDelete = "compareAndDelete" Expire = "expire" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Action string `json:"action"` Node *NodeExtern `json:"node,omitempty"` PrevNode *NodeExtern `json:"prevNode,omitempty"` EtcdIndex uint64 `json:"-"` Refresh bool `json:"refresh,omitempty"` }
func (*Event) SetRefresh ¶
func (e *Event) SetRefresh()
type NodeExtern ¶
type NodeExtern struct { Key string `json:"key,omitempty"` Value *string `json:"value,omitempty"` Dir bool `json:"dir,omitempty"` Expiration *time.Time `json:"expiration,omitempty"` TTL int64 `json:"ttl,omitempty"` Nodes NodeExterns `json:"nodes"` ModifiedIndex uint64 `json:"modifiedIndex,omitempty"` CreatedIndex uint64 `json:"createdIndex,omitempty"` }
NodeExtern is the external representation of the internal node with additional fields PrevValue is the previous value of the node TTL is time to live in second
func (*NodeExtern) Clone ¶
func (eNode *NodeExtern) Clone() *NodeExtern
type NodeExterns ¶
type NodeExterns []*NodeExtern
func (NodeExterns) Len ¶
func (ns NodeExterns) Len() int
func (NodeExterns) Less ¶
func (ns NodeExterns) Less(i, j int) bool
func (NodeExterns) Swap ¶
func (ns NodeExterns) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.