Registry / messaging / go-redsync-redsync-v4

go-redsync-redsync-v4

JSON →
library4.16.0gogounverified

Provides a Redis-based distributed mutual exclusion lock implementation.

go get github.com/go-redsync/redsync/v4
INSTALL
IMPORT
SIG · GO-REDSYNC-REDSYNC
G
go-redsync-redsync-v4
messaginggov4.16.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.

redsync
github.com/go-redsync/redsync/v4

Create a new Redis mutex.

package main import ( "fmt" "github.com/go-redsync/redsync/v4" "github.com/go-redsync/redsync/v4/redis/goredis/v9" goredis "github.com/redis/go-redis/v9" ) func main() { client := goredis.NewClient(&goredis.Options{Addr: "localhost:6379"}) pool := goredis.NewPool(client) rs := redsync.New(pool) mutex := rs.NewMutex("my-lock") fmt.Println(mutex) }
Debug
Known issues
gotchaVersion 4 uses Go modules; ensure you import the correct subpackage for your Redis client.
fix
Use the appropriate pool implementation (e.g., goredis/v9).
affects: >=4.0.0
Upgrade
Version history
4.16.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
go-redsync-redsync-v4 — go get go-redsync-redsync-v4 · libregistry