https://github.com/dineshgowda24/redislock
🔏 Simplified distributed locking implementation using Redis
https://github.com/dineshgowda24/redislock
distributedlock go golang lock redis
Last synced: about 2 months ago
JSON representation
🔏 Simplified distributed locking implementation using Redis
- Host: GitHub
- URL: https://github.com/dineshgowda24/redislock
- Owner: dineshgowda24
- License: other
- Created: 2020-07-29T16:14:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T14:22:28.000Z (almost 5 years ago)
- Last Synced: 2025-03-25T09:12:03.020Z (2 months ago)
- Topics: distributedlock, go, golang, lock, redis
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redislock
[](https://travis-ci.com/dineshgowda24/redislock)
[](http://godoc.org/github.com/dineshgowda24/redislock)
[](https://goreportcard.com/report/github.com/dineshgowda24/redislock)
[](https://opensource.org/licenses/Apache-2.0)Simplified distributed locking implementation using [Redis](http://redis.io/topics/distlock).
For more information, please see examples.## Motivation
I came across a concurrency issue when multiple clients were accessing single redis instance. So I wanted a primitive locking solution, but redis did not have one implemented. So started looking for open source libraries and found [redislock](https://github.com/bsm/redislock) very well written and effective library. But it still did not solve my problem as I was using [redigo](https://github.com/garyburd/redigo) client but the package used [go-redis](https://github.com/go-redis/redis). Although `redigo` had [`redsync`](https://github.com/go-redsync/redsync), I wanted a much more simpler one and so with `redislock`.
## Features
- Simple and easy to use interface.
- Plug in any redis client of your choice by implementing the `RedisClient` interface.
- Simple but effective locking for single redis instance.## Examples
Check out examples in for [`garyburd`](./examples/garyburd) and [`go-redis`](./examples/goredis) clients.
## Documentation
Full documentation is available on [GoDoc](http://godoc.org/github.com/dineshgowda24/redislock)
## Contribution
Feel free to send a PR.