{"action":"opened","number":65,"pull_request":{"url":"https://api.github.com/repos/go-kit/kit/pulls/65","id":38085767,"html_url":"https://github.com/go-kit/kit/pull/65","diff_url":"https://github.com/go-kit/kit/pull/65.diff","patch_url":"https://github.com/go-kit/kit/pull/65.patch","issue_url":"https://api.github.com/repos/go-kit/kit/issues/65","number":65,"state":"open","locked":false,"title":"ratelimit: simplify","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"body":"Following on from my comments on #57, here's an implementation\r\nof those ideas. This removes token bucket creation entirely\r\nfrom the package, giving clients the freedom to create the\r\nbucket in any way they choose.\r\n\r\nFor example, it's common to want to start with the token bucket\r\nempty, but the current implementation does not provide this possibility\r\nwithout adding extra options.\r\n\r\nIt also fixes the implementation - the current implementation will\r\nallow a request even if there are less tokens available than requested.\r\n","created_at":"2015-06-19T08:15:23Z","updated_at":"2015-06-19T08:15:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/go-kit/kit/pulls/65/commits","review_comments_url":"https://api.github.com/repos/go-kit/kit/pulls/65/comments","review_comment_url":"https://api.github.com/repos/go-kit/kit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-kit/kit/issues/65/comments","statuses_url":"https://api.github.com/repos/go-kit/kit/statuses/6d1445b77c68e337acbd21ba391130c44f4834b1","head":{"label":"rogpeppe:simpler-ratelimit","ref":"simpler-ratelimit","sha":"6d1445b77c68e337acbd21ba391130c44f4834b1","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"repo":{"id":37707885,"name":"kit","full_name":"rogpeppe/kit","owner":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rogpeppe/kit","description":"A Go toolkit for microservices.","fork":true,"url":"https://api.github.com/repos/rogpeppe/kit","forks_url":"https://api.github.com/repos/rogpeppe/kit/forks","keys_url":"https://api.github.com/repos/rogpeppe/kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogpeppe/kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogpeppe/kit/teams","hooks_url":"https://api.github.com/repos/rogpeppe/kit/hooks","issue_events_url":"https://api.github.com/repos/rogpeppe/kit/issues/events{/number}","events_url":"https://api.github.com/repos/rogpeppe/kit/events","assignees_url":"https://api.github.com/repos/rogpeppe/kit/assignees{/user}","branches_url":"https://api.github.com/repos/rogpeppe/kit/branches{/branch}","tags_url":"https://api.github.com/repos/rogpeppe/kit/tags","blobs_url":"https://api.github.com/repos/rogpeppe/kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogpeppe/kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogpeppe/kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogpeppe/kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogpeppe/kit/statuses/{sha}","languages_url":"https://api.github.com/repos/rogpeppe/kit/languages","stargazers_url":"https://api.github.com/repos/rogpeppe/kit/stargazers","contributors_url":"https://api.github.com/repos/rogpeppe/kit/contributors","subscribers_url":"https://api.github.com/repos/rogpeppe/kit/subscribers","subscription_url":"https://api.github.com/repos/rogpeppe/kit/subscription","commits_url":"https://api.github.com/repos/rogpeppe/kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogpeppe/kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogpeppe/kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogpeppe/kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/rogpeppe/kit/contents/{+path}","compare_url":"https://api.github.com/repos/rogpeppe/kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogpeppe/kit/merges","archive_url":"https://api.github.com/repos/rogpeppe/kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogpeppe/kit/downloads","issues_url":"https://api.github.com/repos/rogpeppe/kit/issues{/number}","pulls_url":"https://api.github.com/repos/rogpeppe/kit/pulls{/number}","milestones_url":"https://api.github.com/repos/rogpeppe/kit/milestones{/number}","notifications_url":"https://api.github.com/repos/rogpeppe/kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogpeppe/kit/labels{/name}","releases_url":"https://api.github.com/repos/rogpeppe/kit/releases{/id}","created_at":"2015-06-19T07:21:26Z","updated_at":"2015-06-19T07:21:26Z","pushed_at":"2015-06-19T08:10:12Z","git_url":"git://github.com/rogpeppe/kit.git","ssh_url":"git@github.com:rogpeppe/kit.git","clone_url":"https://github.com/rogpeppe/kit.git","svn_url":"https://github.com/rogpeppe/kit","homepage":"http://gokit.io","size":1204,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"go-kit:master","ref":"master","sha":"c6bdff665e1dbd1d99fe258e828b0842a2b8db98","user":{"login":"go-kit","id":10981023,"avatar_url":"https://avatars.githubusercontent.com/u/10981023?v=3","gravatar_id":"","url":"https://api.github.com/users/go-kit","html_url":"https://github.com/go-kit","followers_url":"https://api.github.com/users/go-kit/followers","following_url":"https://api.github.com/users/go-kit/following{/other_user}","gists_url":"https://api.github.com/users/go-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/go-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-kit/subscriptions","organizations_url":"https://api.github.com/users/go-kit/orgs","repos_url":"https://api.github.com/users/go-kit/repos","events_url":"https://api.github.com/users/go-kit/events{/privacy}","received_events_url":"https://api.github.com/users/go-kit/received_events","type":"Organization","site_admin":false},"repo":{"id":30215630,"name":"kit","full_name":"go-kit/kit","owner":{"login":"go-kit","id":10981023,"avatar_url":"https://avatars.githubusercontent.com/u/10981023?v=3","gravatar_id":"","url":"https://api.github.com/users/go-kit","html_url":"https://github.com/go-kit","followers_url":"https://api.github.com/users/go-kit/followers","following_url":"https://api.github.com/users/go-kit/following{/other_user}","gists_url":"https://api.github.com/users/go-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/go-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-kit/subscriptions","organizations_url":"https://api.github.com/users/go-kit/orgs","repos_url":"https://api.github.com/users/go-kit/repos","events_url":"https://api.github.com/users/go-kit/events{/privacy}","received_events_url":"https://api.github.com/users/go-kit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/go-kit/kit","description":"A Go toolkit for microservices.","fork":false,"url":"https://api.github.com/repos/go-kit/kit","forks_url":"https://api.github.com/repos/go-kit/kit/forks","keys_url":"https://api.github.com/repos/go-kit/kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-kit/kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-kit/kit/teams","hooks_url":"https://api.github.com/repos/go-kit/kit/hooks","issue_events_url":"https://api.github.com/repos/go-kit/kit/issues/events{/number}","events_url":"https://api.github.com/repos/go-kit/kit/events","assignees_url":"https://api.github.com/repos/go-kit/kit/assignees{/user}","branches_url":"https://api.github.com/repos/go-kit/kit/branches{/branch}","tags_url":"https://api.github.com/repos/go-kit/kit/tags","blobs_url":"https://api.github.com/repos/go-kit/kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-kit/kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-kit/kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-kit/kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-kit/kit/statuses/{sha}","languages_url":"https://api.github.com/repos/go-kit/kit/languages","stargazers_url":"https://api.github.com/repos/go-kit/kit/stargazers","contributors_url":"https://api.github.com/repos/go-kit/kit/contributors","subscribers_url":"https://api.github.com/repos/go-kit/kit/subscribers","subscription_url":"https://api.github.com/repos/go-kit/kit/subscription","commits_url":"https://api.github.com/repos/go-kit/kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-kit/kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-kit/kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-kit/kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-kit/kit/contents/{+path}","compare_url":"https://api.github.com/repos/go-kit/kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-kit/kit/merges","archive_url":"https://api.github.com/repos/go-kit/kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-kit/kit/downloads","issues_url":"https://api.github.com/repos/go-kit/kit/issues{/number}","pulls_url":"https://api.github.com/repos/go-kit/kit/pulls{/number}","milestones_url":"https://api.github.com/repos/go-kit/kit/milestones{/number}","notifications_url":"https://api.github.com/repos/go-kit/kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-kit/kit/labels{/name}","releases_url":"https://api.github.com/repos/go-kit/kit/releases{/id}","created_at":"2015-02-03T00:01:19Z","updated_at":"2015-06-18T19:55:33Z","pushed_at":"2015-06-19T08:15:23Z","git_url":"git://github.com/go-kit/kit.git","ssh_url":"git@github.com:go-kit/kit.git","clone_url":"https://github.com/go-kit/kit.git","svn_url":"https://github.com/go-kit/kit","homepage":"http://gokit.io","size":1204,"stargazers_count":974,"watchers_count":974,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":13,"forks":44,"open_issues":13,"watchers":974,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/go-kit/kit/pulls/65"},"html":{"href":"https://github.com/go-kit/kit/pull/65"},"issue":{"href":"https://api.github.com/repos/go-kit/kit/issues/65"},"comments":{"href":"https://api.github.com/repos/go-kit/kit/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/go-kit/kit/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/go-kit/kit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-kit/kit/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/go-kit/kit/statuses/6d1445b77c68e337acbd21ba391130c44f4834b1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":91,"deletions":127,"changed_files":3}}