Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdLocker ¶
type EtcdLocker struct {
// contains filtered or unexported fields
}
func (*EtcdLocker) Acquire ¶
func (locker *EtcdLocker) Acquire(key string, ttl uint64) (Lock, error)
func (*EtcdLocker) Wait ¶
func (locker *EtcdLocker) Wait(key string) error
func (*EtcdLocker) WaitAcquire ¶
func (locker *EtcdLocker) WaitAcquire(key string, ttl uint64) (Lock, error)
type Locker ¶
type Locker interface { Acquire(key string, ttl uint64) (Lock, error) WaitAcquire(key string, ttl uint64) (Lock, error) Wait(key string) error }
func NewEtcdLocker ¶
type MockLocker ¶
func NewMockLocker ¶
func NewMockLocker() *MockLocker
func (*MockLocker) Acquire ¶
func (locker *MockLocker) Acquire(path string, ttl uint64) (Lock, error)
func (*MockLocker) Wait ¶
func (locker *MockLocker) Wait(path string) error
func (*MockLocker) WaitAcquire ¶
func (locker *MockLocker) WaitAcquire(path string, ttl uint64) (Lock, error)
Click to show internal directories.
Click to hide internal directories.