Documentation ¶
Index ¶
- type EtcdBackend
- func (e *EtcdBackend) Close() error
- func (e *EtcdBackend) GetLocks(group string) (int, error)
- func (e *EtcdBackend) GetStaleLocks(ts time.Duration) ([]types.Lock, error)
- func (e *EtcdBackend) HasLock(group string, id string) (bool, error)
- func (e *EtcdBackend) Release(group string, id string) error
- func (e *EtcdBackend) Reserve(group string, id string) error
- type EtcdConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdBackend ¶
type EtcdBackend struct {
// contains filtered or unexported fields
}
func NewEtcdBackend ¶
func NewEtcdBackend(cfg EtcdConfig) (*EtcdBackend, error)
func (*EtcdBackend) Close ¶
func (e *EtcdBackend) Close() error
Calls all necessary finalization if necessary
func (*EtcdBackend) GetLocks ¶
func (e *EtcdBackend) GetLocks(group string) (int, error)
Returns the current number of locks for the given group
func (*EtcdBackend) GetStaleLocks ¶
Return all locks older than x
func (*EtcdBackend) HasLock ¶
func (e *EtcdBackend) HasLock(group string, id string) (bool, error)
Check if a given id already has a lock for this group
Click to show internal directories.
Click to hide internal directories.