{"id":23290824,"url":"https://github.com/imega/gomemcache-selector","last_synced_at":"2025-10-18T07:58:13.579Z","repository":{"id":57597068,"uuid":"375648246","full_name":"iMega/gomemcache-selector","owner":"iMega","description":"Memcache consistent hash portable for Go. Exploring consistent hashing in Go.","archived":false,"fork":false,"pushed_at":"2021-06-15T09:40:17.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T23:46:14.950Z","etag":null,"topics":["consistent-hashing","ketama","memcache","php-memcached"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMega.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-06-10T09:49:02.000Z","updated_at":"2021-06-15T08:31:50.000Z","dependencies_parsed_at":"2022-08-25T00:21:53.874Z","dependency_job_id":null,"html_url":"https://github.com/iMega/gomemcache-selector","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMega%2Fgomemcache-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMega%2Fgomemcache-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMega%2Fgomemcache-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMega%2Fgomemcache-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMega","download_url":"https://codeload.github.com/iMega/gomemcache-selector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526675,"owners_count":20953141,"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":["consistent-hashing","ketama","memcache","php-memcached"],"created_at":"2024-12-20T05:12:56.923Z","updated_at":"2025-10-18T07:58:08.533Z","avatar_url":"https://github.com/iMega.png","language":"Go","readme":"# About\n\nThis contains implementation of the consistent hash for memcache\n(client available at https://github.com/bradfitz/gomemcache/).\nIt was written using and for the Go programming language.\n\n-   [Memcache consistent hash portable for Go](https://github.com/iMega/gomemcache-selector/blob/main/php-memcache/selector.go)\n-   [Memcache consistent hash](https://github.com/php/pecl-caching-memcache/blob/master/memcache_consistent_hash.c)\n\n## Using\n\n```\n$ go get github.com/imega/gomemcache-selector/php-memcache\n```\n\n## Example\n\n```\nimport (\n        \"github.com/bradfitz/gomemcache/memcache\"\n        \"github.com/imega/gomemcache-selector/php-memcache\"\n)\n\nfunc main() {\n    selector := phpmemcache.New(\"10.0.0.1:11211\", \"10.0.0.2:11211\", \"10.0.0.3:11212\")\n    mc := memcache.NewFromSelector(selector)\n\n    mc.Set(\u0026memcache.Item{Key: \"foo\", Value: []byte(\"my value\")})\n\n    it, err := mc.Get(\"foo\")\n    ...\n}\n```\n\n## Reference\n\n-   [Memcache client library for the Go](https://github.com/bradfitz/gomemcache)\n-   [A gomemcache ServerSelector using the ketama selection algorithm ](https://github.com/rckclmbr/goketama)\n-   [Consistent Hashing: Algorithmic Tradeoffs - Damian Gryski](https://dgryski.medium.com/consistent-hashing-algorithmic-tradeoffs-ef6b8e2fcae8)\n-   [Ketama implementation compatible with Algorithm::ConsistentHash::Ketama](github.com/dgryski/go-ketama)\n-   [libketama-style consistent hashing in Go](https://github.com/ngerakines/ketama)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimega%2Fgomemcache-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimega%2Fgomemcache-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimega%2Fgomemcache-selector/lists"}