Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Etcd ¶
type Etcd struct {
// contains filtered or unexported fields
}
Etcd takes and holds a leader lease until it can no longer confirm it owns the lease, then returns.
func (*Etcd) AcquireAndHold ¶
AcquireAndHold implements an acquire and release of a lease.
type Leaser ¶
type Leaser interface {
// AcquireAndHold tries to acquire the lease and hold it until it expires, the lease is lost,
// or we observe another party take the lease. The provided function will be invoked when the
// lease is acquired, and the provided channel will be closed when the lease is lost. If the
// function returns true, the lease will be released on exit. If the function returns false,
// the lease will be held.
AcquireAndHold(chan error)
// Release returns any active leases
Release()
}
Leaser allows a caller to acquire a lease and be notified when it is lost.
Click to show internal directories.
Click to hide internal directories.