{"id":37184370,"url":"https://github.com/bry00/fmutex","last_synced_at":"2026-01-14T21:18:06.737Z","repository":{"id":57568619,"uuid":"328809012","full_name":"bry00/fmutex","owner":"bry00","description":"Simple golang package designated to provide simple mutex locking, based on filesystem hard links functionality.","archived":false,"fork":false,"pushed_at":"2021-02-21T18:23:54.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T10:15:52.327Z","etag":null,"topics":["distributed-locking","golang","mutex","mutex-synchronisation"],"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/bry00.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-01-11T22:36:01.000Z","updated_at":"2021-02-21T18:23:56.000Z","dependencies_parsed_at":"2022-08-30T07:30:20.175Z","dependency_job_id":null,"html_url":"https://github.com/bry00/fmutex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bry00/fmutex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bry00%2Ffmutex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bry00%2Ffmutex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bry00%2Ffmutex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bry00%2Ffmutex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bry00","download_url":"https://codeload.github.com/bry00/fmutex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bry00%2Ffmutex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-locking","golang","mutex","mutex-synchronisation"],"created_at":"2026-01-14T21:18:06.093Z","updated_at":"2026-01-14T21:18:06.729Z","avatar_url":"https://github.com/bry00.png","language":"Go","readme":"# fmutex/mutex\n\nPackage mutext is designated to provide simple mutex locking\nbased on filesystem hard links functionality.\nGiven filesystem link function must fail, if target file already exists,\nwhich is true for the Linux and MacOS platforms.\n\nThe module is designated to be used in distributed environment, using common\nresource of the filesystem, for example for synchnonization during\ninitialization of K8s pods.\n\nRelated sample program `fmutex` can be used as a mutex utility for shell scripts.\n\n## Getting started\n\nTo install run:\n\n```console\ngo get github.com/bry00/fmutex\n```\n\nFor usage example see the source of the sample `fmutex utility`: [main.go](main.go)\n\nFor a quick start, below is very simple usage sample:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"github.com/bry00/fmutex/mutex\"\n)\n\nconst MUTEX_ID = \"sample-mutex\"\nconst MUTEX_ROOT := \"/tmp\"\n\nfunc main() {\n\tmx, err := mutex.NewMutex(MUTEX_ROOT, MUTEX_ID)\n\tif err != nil {\n\t\tlog.Fatalf(\"cannot create the mutex: %v\", err)\n\t}\n\tdefer mx.Unlock()\n\tmx.Lock()\n\t// Do something that needs to be synced\n\tfmt.Println(\"DONE\")\n}\n```\n\n## License\n\nThe package is released under [the MIT license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbry00%2Ffmutex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbry00%2Ffmutex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbry00%2Ffmutex/lists"}