{"id":24601119,"url":"https://github.com/skyterra/redis-lock","last_synced_at":"2026-05-17T12:14:34.500Z","repository":{"id":48984014,"uuid":"382014886","full_name":"skyterra/redis-lock","owner":"skyterra","description":"使用redis实现分布式锁","archived":false,"fork":false,"pushed_at":"2021-07-02T06:47:38.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T14:39:14.791Z","etag":null,"topics":["distributed-lock","golang","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyterra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-01T11:47:31.000Z","updated_at":"2021-07-07T08:34:24.000Z","dependencies_parsed_at":"2022-09-05T05:31:14.183Z","dependency_job_id":null,"html_url":"https://github.com/skyterra/redis-lock","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyterra%2Fredis-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyterra%2Fredis-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyterra%2Fredis-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyterra%2Fredis-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyterra","download_url":"https://codeload.github.com/skyterra/redis-lock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244181443,"owners_count":20411604,"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":["distributed-lock","golang","redis"],"created_at":"2025-01-24T14:39:30.304Z","updated_at":"2026-05-17T12:14:29.444Z","avatar_url":"https://github.com/skyterra.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![example workflow](https://github.com/skyterra/redis-lock/actions/workflows/go.yml/badge.svg)\n# redis-lock\n使用redis实现分布式锁\n\n# 使用说明\n\n```go\npackage main\n\nimport (\n\t\"github.com/skyterra/redis-lock/lock\"\n\t\"log\"\n)\n\nfunc main() {\n\tlockName := \"doc:abc:123:efg\"\n\n\tp, err := lock.DialRedis(\"127.0.0.1\", \"\", 6379, 0)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t\n\tconn := p.Get()\n\tid, err := lock.AcquireLock(conn, lockName, 100, 10*1000)\n\t// TODO your operation.\n\n\n\tlock.ReleaseLock(conn, lockName, id)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyterra%2Fredis-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyterra%2Fredis-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyterra%2Fredis-lock/lists"}