{"action":"created","comment":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/comments/75059505","id":75059505,"diff_hunk":"@@ -0,0 +1,16 @@\n+package orchestrator\n+\n+import (\n+\t\"errors\"\n+)\n+\n+var (\n+\terrReplicatedOrchestratorStarted    = errors.New(\"ReplicatedOrchestrator: already started\")\n+\terrReplicatedOrchestratorNotStarted = errors.New(\"ReplicatedOrchestrator: not started\")\n+\n+\terrGlobalOrchestratorStarted    = errors.New(\"GlobalOrchestrator: already started\")\n+\terrGlobalOrchestratorNotStarted = errors.New(\"GlobalOrchestrator: not started\")\n+\n+\terrTaskReaperStarted    = errors.New(\"TaskReaper: already started\")\n+\terrTaskReaperNotStarted = errors.New(\"TaskReaper: not started\")\n+)","path":"manager/orchestrator/errors.go","position":16,"original_position":16,"commit_id":"062ba3567072d753590b41ed2b8fca13c914d97f","original_commit_id":"062ba3567072d753590b41ed2b8fca13c914d97f","user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"body":"I prefer not to move the errors to a separate file - especially since all of these errors are specific to the code in a particular file.","created_at":"2016-08-17T03:58:25Z","updated_at":"2016-08-17T03:58:25Z","html_url":"https://github.com/docker/swarmkit/pull/1387#discussion_r75059505","pull_request_url":"https://api.github.com/repos/docker/swarmkit/pulls/1387","_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments/75059505"},"html":{"href":"https://github.com/docker/swarmkit/pull/1387#discussion_r75059505"},"pull_request":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/1387"}}},"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/1387","id":81580741,"html_url":"https://github.com/docker/swarmkit/pull/1387","diff_url":"https://github.com/docker/swarmkit/pull/1387.diff","patch_url":"https://github.com/docker/swarmkit/pull/1387.patch","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/1387","number":1387,"state":"open","locked":false,"title":"[WIP] Refactor: Add a leader structure","user":{"login":"jimmyxian","id":3146645,"avatar_url":"https://avatars.githubusercontent.com/u/3146645?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyxian","html_url":"https://github.com/jimmyxian","followers_url":"https://api.github.com/users/jimmyxian/followers","following_url":"https://api.github.com/users/jimmyxian/following{/other_user}","gists_url":"https://api.github.com/users/jimmyxian/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyxian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyxian/subscriptions","organizations_url":"https://api.github.com/users/jimmyxian/orgs","repos_url":"https://api.github.com/users/jimmyxian/repos","events_url":"https://api.github.com/users/jimmyxian/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyxian/received_events","type":"User","site_admin":false},"body":"Add a leader structure and move the following components into leader:\r\n\r\n- [X] replicatedOrchestrator\r\n- [X] globalOrchestrator\r\n- [X] taskReaper\r\n- [ ] scheduler\r\n- [ ] allocator\r\n- [ ] keyManager\r\n- [ ] caserver\r\n- [ ] Dispatcher\r\n\r\nSigned-off-by: Xian Chaobo <xianchaobo@huawei.com>","created_at":"2016-08-17T03:55:15Z","updated_at":"2016-08-17T03:58:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f013be01a1552d12659d5fc06b49dd0f697d94e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarmkit/pulls/1387/commits","review_comments_url":"https://api.github.com/repos/docker/swarmkit/pulls/1387/comments","review_comment_url":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1387/comments","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/062ba3567072d753590b41ed2b8fca13c914d97f","head":{"label":"jimmyxian:refactor-code-add-leader","ref":"refactor-code-add-leader","sha":"062ba3567072d753590b41ed2b8fca13c914d97f","user":{"login":"jimmyxian","id":3146645,"avatar_url":"https://avatars.githubusercontent.com/u/3146645?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyxian","html_url":"https://github.com/jimmyxian","followers_url":"https://api.github.com/users/jimmyxian/followers","following_url":"https://api.github.com/users/jimmyxian/following{/other_user}","gists_url":"https://api.github.com/users/jimmyxian/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyxian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyxian/subscriptions","organizations_url":"https://api.github.com/users/jimmyxian/orgs","repos_url":"https://api.github.com/users/jimmyxian/repos","events_url":"https://api.github.com/users/jimmyxian/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyxian/received_events","type":"User","site_admin":false},"repo":{"id":60820569,"name":"swarmkit","full_name":"jimmyxian/swarmkit","owner":{"login":"jimmyxian","id":3146645,"avatar_url":"https://avatars.githubusercontent.com/u/3146645?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyxian","html_url":"https://github.com/jimmyxian","followers_url":"https://api.github.com/users/jimmyxian/followers","following_url":"https://api.github.com/users/jimmyxian/following{/other_user}","gists_url":"https://api.github.com/users/jimmyxian/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyxian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyxian/subscriptions","organizations_url":"https://api.github.com/users/jimmyxian/orgs","repos_url":"https://api.github.com/users/jimmyxian/repos","events_url":"https://api.github.com/users/jimmyxian/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyxian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimmyxian/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":true,"url":"https://api.github.com/repos/jimmyxian/swarmkit","forks_url":"https://api.github.com/repos/jimmyxian/swarmkit/forks","keys_url":"https://api.github.com/repos/jimmyxian/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimmyxian/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimmyxian/swarmkit/teams","hooks_url":"https://api.github.com/repos/jimmyxian/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/jimmyxian/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/jimmyxian/swarmkit/events","assignees_url":"https://api.github.com/repos/jimmyxian/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/jimmyxian/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/jimmyxian/swarmkit/tags","blobs_url":"https://api.github.com/repos/jimmyxian/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimmyxian/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimmyxian/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimmyxian/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimmyxian/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/jimmyxian/swarmkit/languages","stargazers_url":"https://api.github.com/repos/jimmyxian/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/jimmyxian/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/jimmyxian/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/jimmyxian/swarmkit/subscription","commits_url":"https://api.github.com/repos/jimmyxian/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimmyxian/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimmyxian/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimmyxian/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimmyxian/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/jimmyxian/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimmyxian/swarmkit/merges","archive_url":"https://api.github.com/repos/jimmyxian/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimmyxian/swarmkit/downloads","issues_url":"https://api.github.com/repos/jimmyxian/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/jimmyxian/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/jimmyxian/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/jimmyxian/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimmyxian/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/jimmyxian/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/jimmyxian/swarmkit/deployments","created_at":"2016-06-10T02:50:24Z","updated_at":"2016-06-10T02:50:25Z","pushed_at":"2016-08-17T03:46:41Z","git_url":"git://github.com/jimmyxian/swarmkit.git","ssh_url":"git@github.com:jimmyxian/swarmkit.git","clone_url":"https://github.com/jimmyxian/swarmkit.git","svn_url":"https://github.com/jimmyxian/swarmkit","homepage":"","size":9036,"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":"27bda4e2094f3e71631d3e0be3aeff10c5761f2f","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":51556828,"name":"swarmkit","full_name":"docker/swarmkit","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/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":false,"url":"https://api.github.com/repos/docker/swarmkit","forks_url":"https://api.github.com/repos/docker/swarmkit/forks","keys_url":"https://api.github.com/repos/docker/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarmkit/teams","hooks_url":"https://api.github.com/repos/docker/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/docker/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarmkit/events","assignees_url":"https://api.github.com/repos/docker/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarmkit/tags","blobs_url":"https://api.github.com/repos/docker/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarmkit/languages","stargazers_url":"https://api.github.com/repos/docker/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/docker/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/docker/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/docker/swarmkit/subscription","commits_url":"https://api.github.com/repos/docker/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarmkit/merges","archive_url":"https://api.github.com/repos/docker/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarmkit/downloads","issues_url":"https://api.github.com/repos/docker/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/docker/swarmkit/deployments","created_at":"2016-02-12T00:02:15Z","updated_at":"2016-08-16T21:54:53Z","pushed_at":"2016-08-17T03:55:15Z","git_url":"git://github.com/docker/swarmkit.git","ssh_url":"git@github.com:docker/swarmkit.git","clone_url":"https://github.com/docker/swarmkit.git","svn_url":"https://github.com/docker/swarmkit","homepage":"","size":19960,"stargazers_count":886,"watchers_count":886,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":157,"mirror_url":null,"open_issues_count":165,"forks":157,"open_issues":165,"watchers":886,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/1387"},"html":{"href":"https://github.com/docker/swarmkit/pull/1387"},"issue":{"href":"https://api.github.com/repos/docker/swarmkit/issues/1387"},"comments":{"href":"https://api.github.com/repos/docker/swarmkit/issues/1387/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/1387/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/1387/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarmkit/statuses/062ba3567072d753590b41ed2b8fca13c914d97f"}}}}
{"actor":{"display_login":"aaronlehmann"}}