Categorygithub.com/crisp-dev/redis-lock
modulepackage
9.0.0+incompatible
Repository: https://github.com/crisp-dev/redis-lock.git
Documentation: pkg.go.dev

# README

redis-lock

Modified to work with gopkg.in/redis.v4.

# Functions

New creates a new distributed locker on a given key.
Obtain is a shortcut for New().Lock().
Run runs a callback handler with a Redis lock.

# Variables

ErrLockNotObtained may be returned by Obtain() and Run() if a lock could not be obtained.
ErrLockNotObtained may be returned by Obtain() and Run() if a lock could not be obtained.
ErrLockNotObtained may be returned by Obtain() and Run() if a lock could not be obtained.

# Structs

Locker allows (repeated) distributed locking.
Options describe the options for the lock.

# Interfaces

RedisClient is a minimal client interface.