使用 Redis 为 Go 实现分布式互斥锁
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.
Install Redsync using the go get command:
$ go get github.com/go-redsync/redsync/v4
Two driver implementations will be installed; however, only the one used will be included in your project.
See the examples folder for usage of each driver.
Error handling is simplified to panic for shorter example.
…
Contributions are welcome.
Redsync 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.
Below is a list of public, open source projects that use Redsync:
If you are using Redsync in a project please send a pull request to add it to the list.
暂无开放 Issues,或尚未同步最近议题。