{"id":37205535,"url":"https://github.com/yguilai/go-consistenthash","last_synced_at":"2026-01-14T23:40:51.778Z","repository":{"id":294392232,"uuid":"986044733","full_name":"yguilai/go-consistenthash","owner":"yguilai","description":"a consistent hash implementation in go","archived":false,"fork":false,"pushed_at":"2025-05-21T02:37:14.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T21:02:49.677Z","etag":null,"topics":["consistent-hash","consistenthash","generic","generic-types","hash-ring"],"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/yguilai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-05-19T02:56:57.000Z","updated_at":"2025-05-22T08:42:52.000Z","dependencies_parsed_at":"2025-05-20T08:25:07.650Z","dependency_job_id":"67902d7b-51bb-4253-8deb-e649339d55b1","html_url":"https://github.com/yguilai/go-consistenthash","commit_stats":null,"previous_names":["yguilai/go-consistenthash"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yguilai/go-consistenthash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yguilai%2Fgo-consistenthash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yguilai%2Fgo-consistenthash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yguilai%2Fgo-consistenthash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yguilai%2Fgo-consistenthash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yguilai","download_url":"https://codeload.github.com/yguilai/go-consistenthash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yguilai%2Fgo-consistenthash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":["consistent-hash","consistenthash","generic","generic-types","hash-ring"],"created_at":"2026-01-14T23:40:51.200Z","updated_at":"2026-01-14T23:40:51.765Z","avatar_url":"https://github.com/yguilai.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-consistenthash\n\na consistent hash implementation that inspired by [go-zero](https://github.com/zeromicro/go-zero)\n\nthis library is without third dependency, the go sdk should be since 1.18, because of this library use generic feature\n\n## Usage\n\n```bash\ngo get github.com/yguilai/go-consistenthash\n```\n\n### Simple Use Case\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\tconsistenthash \"github.com/yguilai/go-consistenthash\"\n)\n\ntype StringNode string\n\n// implement consistenthash.Node interface\nfunc (s StringNode) String() string {\n\treturn string(s)\n}\n\nfunc main() {\n\t// use default options\n\tch := consistenthash.New[StringNode]()\n\tnodes := []StringNode{\"localhost:1\", \"localhost:2\", \"localhost:3\"}\n\tch.Add(nodes...)\n\n\tnode, ok := ch.Get(\"key1\")\n\tfmt.Printf(\"node: %v, ok: %v\", node, ok)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyguilai%2Fgo-consistenthash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyguilai%2Fgo-consistenthash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyguilai%2Fgo-consistenthash/lists"}