Name: go-redis-reservation
Owner: Clever
Description: Golang library for resource reservation using Redis
Created: 2015-04-29 03:01:40.0
Updated: 2018-05-15 01:30:50.0
Pushed: 2018-05-18 23:01:46.0
Homepage: null
Size: 35
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Golang library for resource reservation using Redis
port {
"github.com/Clever/go-redis-reservation/reservation"
nager, err := reservation.NewManager("my-redis-host.com:6379", "myWorkerName")
err != nil {
// Error connecting to redis
servation, err := manager.Lock(jobName)
err != nil {
// Reservation is already held for jobName
Worker.DoWork()
r = reservation.Release()
The tests depend on a local redis instance. Run
dis-server &
ke test