{"id":34208904,"url":"https://github.com/khalil-farashiani/golim","last_synced_at":"2026-03-09T22:32:06.274Z","repository":{"id":229168213,"uuid":"764805723","full_name":"khalil-farashiani/golim","owner":"khalil-farashiani","description":"Golim is a Go-based rate limiter using a token bucket algorithm to manage web service request rates with customizable settings.","archived":false,"fork":false,"pushed_at":"2024-04-18T20:49:14.000Z","size":84,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T00:46:26.127Z","etag":null,"topics":["bucket-al","go","golang","limiter","rate-limiter","software","token-bucket"],"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/khalil-farashiani.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":"2024-02-28T18:39:15.000Z","updated_at":"2025-08-26T14:46:42.000Z","dependencies_parsed_at":"2024-04-18T21:55:17.127Z","dependency_job_id":null,"html_url":"https://github.com/khalil-farashiani/golim","commit_stats":null,"previous_names":["khalil-farashiani/golim"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/khalil-farashiani/golim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalil-farashiani%2Fgolim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalil-farashiani%2Fgolim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalil-farashiani%2Fgolim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalil-farashiani%2Fgolim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalil-farashiani","download_url":"https://codeload.github.com/khalil-farashiani/golim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalil-farashiani%2Fgolim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30314628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"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":["bucket-al","go","golang","limiter","rate-limiter","software","token-bucket"],"created_at":"2025-12-15T20:28:32.699Z","updated_at":"2026-03-09T22:32:06.263Z","avatar_url":"https://github.com/khalil-farashiani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golim\n\n## Golim is rate golim based on token bucket algorithm\n\n`Golim` is a rate limiter, `Golim` program written in Go that allows you to control the frequency and concurrency of requests to your web service. It uses a token bucket algorithm to regulate the incoming traffic and prevent overload or abuse. You can customize the parameters of `Golim` to suit your needs, such as the bucket size, the refill rate, endpoint customization, etc.\n\n`Golim` is useful for web developers who want to protect their web service from excessive or malicious requests, while ensuring a fair and smooth user experience. Golim is also easy to use and integrate with your web service with any language like C#, PHP, JS, Python, Golang etc. as it only requires a minimal dependencies.\n\n### Dependencies\nall dependencies automatically resolve\n- sqlc (as query builder)\n- redis-go\n- ff cli\n- robfig-cron\n\n### Usage\n\nfirst of all export redis server address with\n```bash\nexport REDIS_URI=redis://localhost:6379\n```\n\n- #### install golim\n```bash\ngo install github.com/khalil-farashiani/golim@latest\n```\n\n- #### initial golim limiter\n```bash\ngolim init -n \u003climiter id\u003e -d \u003cdestination address without scheme like google.com or 8.8.8.8\u003e\n```\n\n- #### add a role to specific limiter\n```bash\ngolim add -l \u003climiter id\u003e -e \u003cendpoint address like this /users/\u003e -b \u003cbucket size\u003e -a \u003cadd token rate per minute\u003e -i \u003cinitial token\u003e\n```\n\n- ####  remove a role from specific limiter\n```bash\ngolim remove -i \u003crole id\u003e\n```\n\n- #### list all role from specific limiter\n```bash\ngolim get -l\n```\n\n- #### remove a limiter\n```bash\ngolim removel -l \u003climiter id\u003e\n```\n- #### remove a role\n```bash\ngolim remove -i \u003crole id\u003e\n```\n\n``all flags have alternative``\n- -n \u003ckbd\u003e→\u003c/kbd\u003e --name  \n- -p \u003ckbd\u003e→\u003c/kbd\u003e --port\n- -l \u003ckbd\u003e→\u003c/kbd\u003e --limiter\n- -n \u003ckbd\u003e→\u003c/kbd\u003e --name\n- -d \u003ckbd\u003e→\u003c/kbd\u003e --destination\n- -e \u003ckbd\u003e→\u003c/kbd\u003e --endpoint\n- -b \u003ckbd\u003e→\u003c/kbd\u003e --bsize\n- -a \u003ckbd\u003e→\u003c/kbd\u003e --add_token\n- -i \u003ckbd\u003e→\u003c/kbd\u003e --initial_token\n\n## TODO features\n- [ ] add default limiter\n- [ ] add regex\n- [ ] add ui version\n- [ ] make service open failed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalil-farashiani%2Fgolim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalil-farashiani%2Fgolim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalil-farashiani%2Fgolim/lists"}