{"id":16683020,"url":"https://github.com/hlts2/least-connections","last_synced_at":"2025-07-10T20:37:00.161Z","repository":{"id":144203729,"uuid":"141522402","full_name":"hlts2/least-connections","owner":"hlts2","description":"lock-free least-connections balancing algorithm written in golang","archived":false,"fork":false,"pushed_at":"2019-03-14T03:50:40.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-20T08:09:31.754Z","etag":null,"topics":["algorithm","balancer","balancing","go","golang","goroutine-safe","least-connected","lock-free"],"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/hlts2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-19T03:58:32.000Z","updated_at":"2022-09-17T00:23:04.000Z","dependencies_parsed_at":"2023-06-26T00:11:11.795Z","dependency_job_id":null,"html_url":"https://github.com/hlts2/least-connections","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/hlts2%2Fleast-connections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fleast-connections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fleast-connections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fleast-connections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlts2","download_url":"https://codeload.github.com/hlts2/least-connections/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401511,"owners_count":20285058,"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":["algorithm","balancer","balancing","go","golang","goroutine-safe","least-connected","lock-free"],"created_at":"2024-10-12T14:10:06.310Z","updated_at":"2025-03-13T12:14:26.507Z","avatar_url":"https://github.com/hlts2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# least-connections\nleast-connections is least-connections balancing algorithm written in golang\n\n## Requrement\n\nGo (\u003e= 1.8)\n\n## Installation\n\n```shell\ngo get github.com/hlts2/least-connections\n```\n\n## Example\n\n### Basic Example\n```go\nlc, err := New([]*url.URL{\n    {Host: \"192.168.33.10\"},\n    {Host: \"192.168.33.11\"},\n    {Host: \"192.168.33.12\"},\n})\n\nsrc1, done1 := lc.Next() // {Host: \"192.168.33.10\"}\n\nsrc2, done2 := lc.Next() // {Host: \"192.168.33.11\"}\n\ndone1() // Reduce connection of src1\n\nsrc3, done3 := lc.Next() // {Host: \"192.168.33.10\"}\n\n```\n\n\n## Author\n[hlts2](https://github.com/hlts2)\n\n## LICENSE\nleast-connections released under MIT license, refer [LICENSE](https://github.com/hlts2/least-connections/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fleast-connections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlts2%2Fleast-connections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fleast-connections/lists"}