Documentation ¶ Index ¶ func DestroyLock(lock *Lock) error type Lock func NewLock(address string, password string, db int) (*Lock, error) func (lock *Lock) Lock(ownerID string, key string, expireSec int) error func (lock *Lock) TryLock(ownerID string, key string, expireSec int) (bool, error) func (lock *Lock) Unlock(ownerID string, key string) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func DestroyLock ¶ func DestroyLock(lock *Lock) error Types ¶ type Lock ¶ type Lock struct { // contains filtered or unexported fields } func NewLock ¶ func NewLock(address string, password string, db int) (*Lock, error) func (*Lock) Lock ¶ func (lock *Lock) Lock(ownerID string, key string, expireSec int) error func (*Lock) TryLock ¶ func (lock *Lock) TryLock(ownerID string, key string, expireSec int) (bool, error) func (*Lock) Unlock ¶ func (lock *Lock) Unlock(ownerID string, key string) error Source Files ¶ View all Source files lock.go Click to show internal directories. Click to hide internal directories.