{"id":16724283,"url":"https://github.com/badboy/redlock-rs","last_synced_at":"2025-10-30T20:16:31.994Z","repository":{"id":22035411,"uuid":"25363636","full_name":"badboy/redlock-rs","owner":"badboy","description":"Distributed locks with Redis, implemented in Rust","archived":false,"fork":false,"pushed_at":"2024-09-28T21:19:56.000Z","size":2128,"stargazers_count":54,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T07:36:12.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://badboy.github.io/redlock-rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badboy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-17T15:09:29.000Z","updated_at":"2025-02-11T21:57:14.000Z","dependencies_parsed_at":"2024-10-26T21:11:17.624Z","dependency_job_id":"7fb7ad02-7bbf-4745-8db8-4287d2ca3ba9","html_url":"https://github.com/badboy/redlock-rs","commit_stats":{"total_commits":55,"total_committers":13,"mean_commits":4.230769230769231,"dds":0.6363636363636364,"last_synced_commit":"36e0e598d5d7ce0af58ba51b5ad9565ff7e3e53a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fredlock-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fredlock-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fredlock-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fredlock-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badboy","download_url":"https://codeload.github.com/badboy/redlock-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T22:44:39.166Z","updated_at":"2025-10-30T20:16:31.911Z","avatar_url":"https://github.com/badboy.png","language":"Rust","readme":"# redlock-rs - Distributed locks with Redis\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/badboy/redlock-rs/CI)\n![Crates.io](https://img.shields.io/crates/v/redlock)\n\nThis is an implementation of Redlock, the [distributed locking mechanism][distlock] built on top of Redis.\nIt is more or less a port of the [Ruby version][redlock.rb].\n\nIt includes a sample application in [main.rs](src/main.rs).\n\n## Build\n\n```\ncargo build --release\n```\n\n## Usage\n\n```rust\nuse redlock::RedLock;\n\nfn main() {\n  let rl = RedLock::new(vec![\"redis://127.0.0.1:6380/\", \"redis://127.0.0.1:6381/\", \"redis://127.0.0.1:6382/\"]);\n\n  let lock;\n  loop {\n    match rl.lock(\"mutex\".as_bytes(), 1000) {\n      Some(l) =\u003e { lock = l; break }\n      None =\u003e ()\n    }\n  }\n\n  // Critical section\n\n  rl.unlock(\u0026lock);\n}\n\n```\n\n## Tests\n\nRun tests with:\n\n```\ncargo test\n```\n\nRun sample application with:\n\n```\ncargo run --release\n```\n\n## Contribute\n\nIf you find bugs or want to help otherwise, please [open an issue](https://github.com/badboy/redlock-rs/issues).\n\n## Maintainer\n\n* From 2014 to June 2021 this crate was owned and maintained by [@badboy](https://github.com/badboy/)\n* From June 2021 on this crate is maintained by [@aig787](https://github.com/aig787)\n\n## License\n\nBSD. See [LICENSE](LICENSE).  \n\n[distlock]: http://redis.io/topics/distlock\n[redlock.rb]: https://github.com/antirez/redlock-rb\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Fredlock-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadboy%2Fredlock-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Fredlock-rs/lists"}