{"id":27696700,"url":"https://github.com/aprimadi/namespace-lock","last_synced_at":"2025-04-25T15:12:30.544Z","repository":{"id":57538277,"uuid":"286987712","full_name":"aprimadi/namespace-lock","owner":"aprimadi","description":"Namespace lock implementation in Go","archived":false,"fork":false,"pushed_at":"2020-08-12T10:45:26.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T23:15:23.586Z","etag":null,"topics":["distributed-systems","lock","locking"],"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/aprimadi.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":"2020-08-12T10:45:12.000Z","updated_at":"2020-08-13T01:54:58.000Z","dependencies_parsed_at":"2022-09-07T16:50:38.096Z","dependency_job_id":null,"html_url":"https://github.com/aprimadi/namespace-lock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fnamespace-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fnamespace-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fnamespace-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprimadi%2Fnamespace-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aprimadi","download_url":"https://codeload.github.com/aprimadi/namespace-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250840586,"owners_count":21495910,"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-systems","lock","locking"],"created_at":"2025-04-25T15:12:29.998Z","updated_at":"2025-04-25T15:12:30.538Z","avatar_url":"https://github.com/aprimadi.png","language":"Go","readme":"Namespace Lock\n==============\n\nNamespace locking implementation in Go. A namespace is a hierarchical resource\nstructure that can be thought of as a tree similar to directory structure in\nUnix system.\n\n## Usage\n\n```go\npackage main\n\nimport (\n  \"github.com/aprimadi/namespace-lock\"\n)\n\nfunc main() {\n  lock := nlock.NewNamespaceLock()\n\n  go func() {\n    // Acquire a read lock on \"/a\", \"/a/b\"\n    lock.RLock(\"/a/b\")\n\n    // ... do things\n\n    // Release read locks \"/a\" and \"/a/b\"\n    lock.RUnlock(\"/a/b\")\n  }()\n\n  go func() {\n    // Acquire a read lock on \"/a\", \"/a/b\" and a write lock on \"/a/b/c\"\n    lock.Lock(\"/a/b/c\")\n\n    // ... do things\n\n    // Release read locks \"/a\", \"/a/b\" and write lock \"/a/b/c\"\n    lock.Unlock(\"/a/b/c\")\n  }()\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprimadi%2Fnamespace-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faprimadi%2Fnamespace-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprimadi%2Fnamespace-lock/lists"}