Registry / utility / bsm-redislock

bsm-redislock

JSON →
library0.10.0gogounverified

A distributed mutex lock implementation for Redis using the Redlock algorithm.

go get github.com/bsm/redislock
INSTALL
IMPORT
SIG · BSM-REDISLOCK
B
bsm-redislock
utilitygov0.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

redislock
github.com/bsm/redislock

Obtains a Redis-based distributed lock and releases it.

package main import ( "context" "github.com/bsm/redislock" "github.com/go-redis/redis/v8" ) func main() { client := redis.NewClient(&redis.Options{Addr: "localhost:6379"}) locker := redislock.New(client) lock, err := locker.Obtain(context.Background(), "my-key", 0, nil) if err != nil { panic(err) } defer lock.Release(context.Background()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.10.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
bsm-redislock — go get bsm-redislock · libregistry