Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultConsulLockRetryInterval = 5 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConsulLock ¶
type ConsulLock struct {
// contains filtered or unexported fields
}
func NewConsulLock ¶
func NewConsulLock(client *api.Client, opts *ConsulLockOptions) (*ConsulLock, error)
func (*ConsulLock) AsyncLock ¶
func (p *ConsulLock) AsyncLock()
func (*ConsulLock) AsyncUnlock ¶
func (p *ConsulLock) AsyncUnlock() bool
func (*ConsulLock) CancelPendingLock ¶
func (p *ConsulLock) CancelPendingLock()
type ConsulLockOptions ¶
type KeyChangeHandler ¶
type KeyChangeHandler func(kv *KVPair)
type KeyWatch ¶
type KeyWatch struct { C <-chan *KVPair // contains filtered or unexported fields }
func NewKeyWatch ¶
func (*KeyWatch) AddHandler ¶
func (o *KeyWatch) AddHandler(key string, handler KeyChangeHandler)
Click to show internal directories.
Click to hide internal directories.