Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReentrantLock ¶
type ReentrantLock struct {
// contains filtered or unexported fields
}
ReentrantLock is a reentrant distributed lock implemented by Redis
func NewReentrantLock ¶
func NewReentrantLock(client *redis.Client, key string, expiration time.Duration) *ReentrantLock
func (*ReentrantLock) Lock ¶
func (r *ReentrantLock) Lock() (bool, error)
func (*ReentrantLock) Unlock ¶
func (r *ReentrantLock) Unlock() error
Click to show internal directories.
Click to hide internal directories.