Skip to content
Distributed mutual exclusion lock using Redis for Go
Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitlab-ci.yml Update .gitlab-ci.yml Feb 2, 2016
.travis.yml Update .travis.yml Oct 9, 2018
LICENSE Add LICENSE file Feb 20, 2016
README.md Update README.md Jul 28, 2019
VERSION Add VERSION file Feb 20, 2016
doc.go Add package documentation Feb 20, 2016
error.go Define package API Feb 2, 2016
go.mod
go.sum
mutex.go Reduce redundant calls to time.Now Sep 15, 2019
mutex_test.go Add a trivial test for failed nodes; closes #12 Apr 5, 2019
redis.go Update redigo import paths Mar 26, 2018
redsync.go Add SetGenValueFunc to set the custom value generator Mar 29, 2019
redsync_test.go Add a trivial test for failed nodes; closes #12 Apr 5, 2019

README.md

Redsync

Build Status

Redsync provides a Redis-based distributed mutual exclusion lock implementation for Go as described in this post. A reference library (by antirez) for Ruby is available at github.com/antirez/redlock-rb.

Installation

Install Redsync using the go get command:

$ go get github.com/go-redsync/redsync

The only dependencies are the Go distribution and Redigo.

Documentation

Contributing

Contributions are welcome.

License

Redsync is available under the BSD (3-Clause) License.

Disclaimer

This code implements an algorithm which is currently a proposal, it was not formally analyzed. Make sure to understand how it works before using it in production environments.

You can’t perform that action at this time.