{"action":"created","comment":{"url":"https://api.github.com/repos/m3db/m3x/pulls/comments/118341634","pull_request_review_id":40124766,"id":118341634,"diff_hunk":"@@ -120,6 +123,13 @@ func (s *server) ListenAndServe() error {\n \treturn nil\n }\n \n+func (s *server) Serve(l net.Listener) error {\n+\ts.address = l.Addr().String()\n+\ts.listener = l\n+\tgo s.serve()\n+\treturn nil","path":"server/server.go","position":18,"original_position":18,"commit_id":"2fb4b47730824f99ff0faa37c6a4f12951ba7c7e","original_commit_id":"2fb4b47730824f99ff0faa37c6a4f12951ba7c7e","user":{"login":"cw9","id":6710599,"avatar_url":"https://avatars3.githubusercontent.com/u/6710599?v=3","gravatar_id":"","url":"https://api.github.com/users/cw9","html_url":"https://github.com/cw9","followers_url":"https://api.github.com/users/cw9/followers","following_url":"https://api.github.com/users/cw9/following{/other_user}","gists_url":"https://api.github.com/users/cw9/gists{/gist_id}","starred_url":"https://api.github.com/users/cw9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cw9/subscriptions","organizations_url":"https://api.github.com/users/cw9/orgs","repos_url":"https://api.github.com/users/cw9/repos","events_url":"https://api.github.com/users/cw9/events{/privacy}","received_events_url":"https://api.github.com/users/cw9/received_events","type":"User","site_admin":false},"body":"do we need to return error in the function signature?","created_at":"2017-05-24T19:18:01Z","updated_at":"2017-05-24T19:18:44Z","html_url":"https://github.com/m3db/m3x/pull/74#discussion_r118341634","pull_request_url":"https://api.github.com/repos/m3db/m3x/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/m3db/m3x/pulls/comments/118341634"},"html":{"href":"https://github.com/m3db/m3x/pull/74#discussion_r118341634"},"pull_request":{"href":"https://api.github.com/repos/m3db/m3x/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/m3db/m3x/pulls/74","id":122288049,"html_url":"https://github.com/m3db/m3x/pull/74","diff_url":"https://github.com/m3db/m3x/pull/74.diff","patch_url":"https://github.com/m3db/m3x/pull/74.patch","issue_url":"https://api.github.com/repos/m3db/m3x/issues/74","number":74,"state":"open","locked":false,"title":"[servers] Add Serve method to server interface","user":{"login":"jeromefroe","id":7217598,"avatar_url":"https://avatars2.githubusercontent.com/u/7217598?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromefroe","html_url":"https://github.com/jeromefroe","followers_url":"https://api.github.com/users/jeromefroe/followers","following_url":"https://api.github.com/users/jeromefroe/following{/other_user}","gists_url":"https://api.github.com/users/jeromefroe/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromefroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromefroe/subscriptions","organizations_url":"https://api.github.com/users/jeromefroe/orgs","repos_url":"https://api.github.com/users/jeromefroe/repos","events_url":"https://api.github.com/users/jeromefroe/events{/privacy}","received_events_url":"https://api.github.com/users/jeromefroe/received_events","type":"User","site_admin":false},"body":"@xichen2020 @cw9 \r\n\r\nThis PR adds a `Serve(l net.Listener)` method to the `Server` interface so that we can explicitly pass a listener to a `Server`. This will be helpful in testing when we don't know in advance what port we want to listen on.","created_at":"2017-05-24T17:57:59Z","updated_at":"2017-05-24T19:18:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ef1934b853c595be2726f8caec771d355b5af71","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/m3db/m3x/pulls/74/commits","review_comments_url":"https://api.github.com/repos/m3db/m3x/pulls/74/comments","review_comment_url":"https://api.github.com/repos/m3db/m3x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m3db/m3x/issues/74/comments","statuses_url":"https://api.github.com/repos/m3db/m3x/statuses/2fb4b47730824f99ff0faa37c6a4f12951ba7c7e","head":{"label":"m3db:jeromefroe/server/add-server-method","ref":"jeromefroe/server/add-server-method","sha":"2fb4b47730824f99ff0faa37c6a4f12951ba7c7e","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":64251470,"name":"m3x","full_name":"m3db/m3x","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3x","description":"Common utility classes used across M3 components","fork":false,"url":"https://api.github.com/repos/m3db/m3x","forks_url":"https://api.github.com/repos/m3db/m3x/forks","keys_url":"https://api.github.com/repos/m3db/m3x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3x/teams","hooks_url":"https://api.github.com/repos/m3db/m3x/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3x/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3x/events","assignees_url":"https://api.github.com/repos/m3db/m3x/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3x/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3x/tags","blobs_url":"https://api.github.com/repos/m3db/m3x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3x/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3x/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3x/languages","stargazers_url":"https://api.github.com/repos/m3db/m3x/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3x/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3x/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3x/subscription","commits_url":"https://api.github.com/repos/m3db/m3x/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3x/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3x/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3x/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3x/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3x/merges","archive_url":"https://api.github.com/repos/m3db/m3x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3x/downloads","issues_url":"https://api.github.com/repos/m3db/m3x/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3x/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3x/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3x/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3x/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3x/deployments","created_at":"2016-07-26T20:16:52Z","updated_at":"2017-01-18T20:20:34Z","pushed_at":"2017-05-24T17:58:00Z","git_url":"git://github.com/m3db/m3x.git","ssh_url":"git@github.com:m3db/m3x.git","clone_url":"https://github.com/m3db/m3x.git","svn_url":"https://github.com/m3db/m3x","homepage":null,"size":189,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"m3db:master","ref":"master","sha":"a0dff15dc5f1025c5e2be5fe3163f5972762b4a8","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":64251470,"name":"m3x","full_name":"m3db/m3x","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars3.githubusercontent.com/u/19937171?v=3","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3x","description":"Common utility classes used across M3 components","fork":false,"url":"https://api.github.com/repos/m3db/m3x","forks_url":"https://api.github.com/repos/m3db/m3x/forks","keys_url":"https://api.github.com/repos/m3db/m3x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3x/teams","hooks_url":"https://api.github.com/repos/m3db/m3x/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3x/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3x/events","assignees_url":"https://api.github.com/repos/m3db/m3x/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3x/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3x/tags","blobs_url":"https://api.github.com/repos/m3db/m3x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3x/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3x/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3x/languages","stargazers_url":"https://api.github.com/repos/m3db/m3x/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3x/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3x/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3x/subscription","commits_url":"https://api.github.com/repos/m3db/m3x/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3x/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3x/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3x/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3x/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3x/merges","archive_url":"https://api.github.com/repos/m3db/m3x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3x/downloads","issues_url":"https://api.github.com/repos/m3db/m3x/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3x/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3x/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3x/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3x/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3x/deployments","created_at":"2016-07-26T20:16:52Z","updated_at":"2017-01-18T20:20:34Z","pushed_at":"2017-05-24T17:58:00Z","git_url":"git://github.com/m3db/m3x.git","ssh_url":"git@github.com:m3db/m3x.git","clone_url":"https://github.com/m3db/m3x.git","svn_url":"https://github.com/m3db/m3x","homepage":null,"size":189,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m3db/m3x/pulls/74"},"html":{"href":"https://github.com/m3db/m3x/pull/74"},"issue":{"href":"https://api.github.com/repos/m3db/m3x/issues/74"},"comments":{"href":"https://api.github.com/repos/m3db/m3x/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/m3db/m3x/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/m3db/m3x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m3db/m3x/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/m3db/m3x/statuses/2fb4b47730824f99ff0faa37c6a4f12951ba7c7e"}}}}
{"actor":{"display_login":"cw9"}}