{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/45287130","id":45287130,"diff_hunk":"@@ -0,0 +1,56 @@\n+package opts\n+\n+import (\n+\t\"fmt\"\n+\n+\t\"github.com/docker/docker/pkg/blkiodev\"\n+)\n+\n+// ThrottledeviceOpt defines a map of ThrottleDevices\n+type ThrottledeviceOpt struct {\n+\tvalues    []*blkiodev.ThrottleDevice\n+\tvalidator ValidatorThrottleFctType\n+}\n+\n+// NewThrottledeviceOpt creates a new ThrottledeviceOpt\n+func NewThrottledeviceOpt(validator ValidatorThrottleFctType) ThrottledeviceOpt {\n+\tvalues := []*blkiodev.ThrottleDevice{}\n+\treturn ThrottledeviceOpt{\n+\t\tvalues:    values,\n+\t\tvalidator: validator,\n+\t}\n+}\n+\n+// Set validates a ThrottleDevice and sets its name as a key in ThrottledeviceOpt\n+func (opt *ThrottledeviceOpt) Set(val string) error {\n+\tvar value *blkiodev.ThrottleDevice\n+\tif opt.validator != nil {\n+\t\tv, err := opt.validator(val)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tvalue = v\n+\t}\n+\t(opt.values) = append((opt.values), value)\n+\treturn nil\n+}\n+\n+// String returns Ulimit values as a string.","path":"opts/throttledevice.go","position":null,"original_position":38,"commit_id":"a5b86349dea8924570c511b59c9e07ce868a69ce","original_commit_id":"549f1653eaa3c3e3d81734eb8fb7e25f99c49b21","user":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"body":"fixed.","created_at":"2015-11-19T01:15:26Z","updated_at":"2015-11-19T01:15:26Z","html_url":"https://github.com/docker/docker/pull/14466#discussion_r45287130","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/14466","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/45287130"},"html":{"href":"https://github.com/docker/docker/pull/14466#discussion_r45287130"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/14466"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/14466","id":39470593,"html_url":"https://github.com/docker/docker/pull/14466","diff_url":"https://github.com/docker/docker/pull/14466.diff","patch_url":"https://github.com/docker/docker/pull/14466.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/14466","number":14466,"state":"open","locked":false,"title":"Add support for blkio read/write bps device","user":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>","created_at":"2015-07-08T12:19:27Z","updated_at":"2015-11-19T01:15:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3ac7d85dc174bc6229e6136a6ac74ccd409841e","assignee":{"login":"jfrazelle","id":1445228,"avatar_url":"https://avatars.githubusercontent.com/u/1445228?v=3","gravatar_id":"","url":"https://api.github.com/users/jfrazelle","html_url":"https://github.com/jfrazelle","followers_url":"https://api.github.com/users/jfrazelle/followers","following_url":"https://api.github.com/users/jfrazelle/following{/other_user}","gists_url":"https://api.github.com/users/jfrazelle/gists{/gist_id}","starred_url":"https://api.github.com/users/jfrazelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfrazelle/subscriptions","organizations_url":"https://api.github.com/users/jfrazelle/orgs","repos_url":"https://api.github.com/users/jfrazelle/repos","events_url":"https://api.github.com/users/jfrazelle/events{/privacy}","received_events_url":"https://api.github.com/users/jfrazelle/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/14466/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/14466/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/14466/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/a5b86349dea8924570c511b59c9e07ce868a69ce","head":{"label":"Mashimiao:add-support-blkio_throtte_bps","ref":"add-support-blkio_throtte_bps","sha":"a5b86349dea8924570c511b59c9e07ce868a69ce","user":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"repo":{"id":29891455,"name":"docker","full_name":"Mashimiao/docker","owner":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mashimiao/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/Mashimiao/docker","forks_url":"https://api.github.com/repos/Mashimiao/docker/forks","keys_url":"https://api.github.com/repos/Mashimiao/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mashimiao/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mashimiao/docker/teams","hooks_url":"https://api.github.com/repos/Mashimiao/docker/hooks","issue_events_url":"https://api.github.com/repos/Mashimiao/docker/issues/events{/number}","events_url":"https://api.github.com/repos/Mashimiao/docker/events","assignees_url":"https://api.github.com/repos/Mashimiao/docker/assignees{/user}","branches_url":"https://api.github.com/repos/Mashimiao/docker/branches{/branch}","tags_url":"https://api.github.com/repos/Mashimiao/docker/tags","blobs_url":"https://api.github.com/repos/Mashimiao/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mashimiao/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mashimiao/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mashimiao/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mashimiao/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/Mashimiao/docker/languages","stargazers_url":"https://api.github.com/repos/Mashimiao/docker/stargazers","contributors_url":"https://api.github.com/repos/Mashimiao/docker/contributors","subscribers_url":"https://api.github.com/repos/Mashimiao/docker/subscribers","subscription_url":"https://api.github.com/repos/Mashimiao/docker/subscription","commits_url":"https://api.github.com/repos/Mashimiao/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mashimiao/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mashimiao/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mashimiao/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mashimiao/docker/contents/{+path}","compare_url":"https://api.github.com/repos/Mashimiao/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mashimiao/docker/merges","archive_url":"https://api.github.com/repos/Mashimiao/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mashimiao/docker/downloads","issues_url":"https://api.github.com/repos/Mashimiao/docker/issues{/number}","pulls_url":"https://api.github.com/repos/Mashimiao/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/Mashimiao/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/Mashimiao/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mashimiao/docker/labels{/name}","releases_url":"https://api.github.com/repos/Mashimiao/docker/releases{/id}","created_at":"2015-01-27T01:32:55Z","updated_at":"2015-03-25T15:12:01Z","pushed_at":"2015-11-19T01:14:52Z","git_url":"git://github.com/Mashimiao/docker.git","ssh_url":"git@github.com:Mashimiao/docker.git","clone_url":"https://github.com/Mashimiao/docker.git","svn_url":"https://github.com/Mashimiao/docker","homepage":"http://www.docker.com","size":74115,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"877fe61f7538a36c5fe312221356f13b83abbf64","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-11-19T00:35:11Z","pushed_at":"2015-11-19T01:14:53Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":116483,"stargazers_count":26359,"watchers_count":26359,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7087,"mirror_url":null,"open_issues_count":1192,"forks":7087,"open_issues":1192,"watchers":26359,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/14466"},"html":{"href":"https://github.com/docker/docker/pull/14466"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/14466"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/14466/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/14466/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/14466/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/a5b86349dea8924570c511b59c9e07ce868a69ce"}}}}