package
0.0.0-20191020161600-58998d98f9ce
Repository: https://github.com/etherlabsio/pkg.git
Documentation: pkg.go.dev

# Functions

NewRedisLocker creates a Locker implementation for Redis.
WithTTL allows one to set a time to live for the mutex lock.

# Constants

DefaultExpiry signifies the default expiration for an acquired lock.

# Variables

ErrNotHeld is returned when trying to release an inactive lock.
ErrNotObtained is returned when a lock cannot be obtained.

# Structs

RedisLocker implements the Locker interface for Redis.
RedisUnlocker implements the Unlocker interface for Redis.

# Interfaces

Locker creates a distributed lock provided a uniquely identifiable lock key.
Unlocker releases the mutex lock.

# Type aliases

Option for overriding the default locking settings.