This package is deprecated. Please switch to github.com/go-redsync/redsync/v4.
Redsync.go provides a Redis-based distributed mutual exclusion lock implementation for Go as described in this blog post. A reference library (by antirez) for Ruby is available at github.com/antirez/redlock-rb.
Install Redsync.go using the go get command:
$ go get github.com/hjr265/redsync.go/redsync
The only dependencies are the Go distribution and github.com/garyburd/redigo/redis
.
Contributions are welcome.
Redsync.go is available under the BSD (3-Clause) License.
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.