百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

redsync

> 编程语言
开源

使用 Redis 为 Go 实现分布式互斥锁

4.0K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

使用 Redis 为 Go 实现分布式互斥锁

Redsync

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/v4

Two driver implementations will be installed; however, only the one used will be included in your project.

  • Redigo
  • Go-redis

See the examples folder for usage of each driver.

Documentation

  • Reference

Usage

Error handling is simplified to panic for shorter example.

…

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.

Real World Uses

Below is a list of public, open source projects that use Redsync:

  • Sourcegraph: Universal code search and intelligence platform. Uses Redsync in an internal cache implementation.
  • Open Match by Google: Flexible, extensible, and scalable video game matchmaking. Uses Redsync with its state store implementation.
  • Gocron by go-co-op: gocron is a job distributed scheduling package which lets you run Go functions at pre-determined intervals using a simple, human-friendly syntax. Uses Redsync with its distributed job scheduler implementation.

If you are using Redsync in a project please send a pull request to add it to the list.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Go-redis
  • •Reference
  • •Sourcegraph: Universal code search and intelligence platform. Uses Redsync in an internal cache implementation.
  • •Open Match by Google: Flexible, extensible, and scalable video game matchmaking. Uses Redsync with its state store implementation.

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言