{"action":"created","comment":{"url":"https://api.github.com/repos/yarpc/yarpc-go/pulls/comments/113254748","pull_request_review_id":34625937,"id":113254748,"diff_hunk":"@@ -133,13 +134,28 @@ func (ts *transportSpec) buildInbound(ic *InboundConfig, t transport.Transport,\n // \t      http:\n // \t        url: \"http://127.0.0.1:80/\"\n type OutboundConfig struct {\n+\tconfig.PeerListConfig\n+\n \t// URL to which requests will be sent for this outbound. This field is\n \t// required.\n \tURL string `config:\"url,interpolate\"`\n }\n \n func (ts *transportSpec) buildOutbound(oc *OutboundConfig, t transport.Transport, k *config.Kit) (*Outbound, error) {\n-\treturn t.(*Transport).NewSingleOutbound(oc.URL, ts.OutboundOptions...), nil\n+\tx := t.(*Transport)\n+\n+\tchooser, err := oc.PeerListConfig.BuildChooser(x, hostport.Identify, k)\n+\tif err != nil {\n+\t\treturn nil, fmt.Errorf(`cannot configure peer chooser for HTTP outbound: %v`, err)\n+\t}\n+\n+\topts := make([]OutboundOption, len(ts.OutboundOptions))\n+\t_ = copy(opts, ts.OutboundOptions)\n+\tif oc.URL != \"\" {\n+\t\topts = append(opts, URLTemplate(oc.URL))","path":"transport/http/config.go","position":31,"original_position":31,"commit_id":"ba197c207899a1ae53625ed501a0d0f633c8c876","original_commit_id":"ba197c207899a1ae53625ed501a0d0f633c8c876","user":{"login":"abhinav","id":41730,"avatar_url":"https://avatars3.githubusercontent.com/u/41730?v=3","gravatar_id":"","url":"https://api.github.com/users/abhinav","html_url":"https://github.com/abhinav","followers_url":"https://api.github.com/users/abhinav/followers","following_url":"https://api.github.com/users/abhinav/following{/other_user}","gists_url":"https://api.github.com/users/abhinav/gists{/gist_id}","starred_url":"https://api.github.com/users/abhinav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhinav/subscriptions","organizations_url":"https://api.github.com/users/abhinav/orgs","repos_url":"https://api.github.com/users/abhinav/repos","events_url":"https://api.github.com/users/abhinav/events{/privacy}","received_events_url":"https://api.github.com/users/abhinav/received_events","type":"User","site_admin":false},"body":"You can just do,\r\n\r\n    opts := ts.OutboundOptions\r\n    if oc.URL != \"\" {\r\n      opts = append(opts, URLTemplate(oc.URL))\r\n    }\r\n\r\nThe original slice won't be modified because it still thinks its length is N\r\nand the new option is out of bounds.\r\n\r\n```\r\n.------ts.OutboundOptions------.  \r\nv                              v\r\n+-------+--------+-----+-------+-------------+\r\n| opt 1 | opt  2 | ... | opt N | URLTemplate |\r\n+-------+--------+-----+-------+-------------+\r\n```\r\n","created_at":"2017-04-25T17:08:07Z","updated_at":"2017-04-25T17:10:34Z","html_url":"https://github.com/yarpc/yarpc-go/pull/957#discussion_r113254748","pull_request_url":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957","_links":{"self":{"href":"https://api.github.com/repos/yarpc/yarpc-go/pulls/comments/113254748"},"html":{"href":"https://github.com/yarpc/yarpc-go/pull/957#discussion_r113254748"},"pull_request":{"href":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957"}}},"pull_request":{"url":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957","id":117098243,"html_url":"https://github.com/yarpc/yarpc-go/pull/957","diff_url":"https://github.com/yarpc/yarpc-go/pull/957.diff","patch_url":"https://github.com/yarpc/yarpc-go/pull/957.patch","issue_url":"https://api.github.com/repos/yarpc/yarpc-go/issues/957","number":957,"state":"open","locked":false,"title":"WIP: config: http: Add configurable peer chooser","user":{"login":"kriskowal","id":60294,"avatar_url":"https://avatars2.githubusercontent.com/u/60294?v=3","gravatar_id":"","url":"https://api.github.com/users/kriskowal","html_url":"https://github.com/kriskowal","followers_url":"https://api.github.com/users/kriskowal/followers","following_url":"https://api.github.com/users/kriskowal/following{/other_user}","gists_url":"https://api.github.com/users/kriskowal/gists{/gist_id}","starred_url":"https://api.github.com/users/kriskowal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kriskowal/subscriptions","organizations_url":"https://api.github.com/users/kriskowal/orgs","repos_url":"https://api.github.com/users/kriskowal/repos","events_url":"https://api.github.com/users/kriskowal/events{/privacy}","received_events_url":"https://api.github.com/users/kriskowal/received_events","type":"User","site_admin":false},"body":"This change adds support for configuring an HTTP peer chooser.\r\n\r\n- [x] remove \"choose:\" subsection from each config.","created_at":"2017-04-22T06:34:40Z","updated_at":"2017-04-25T17:10:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a77a4ad8dde98e80aa9a48345b62b244ee934f2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957/commits","review_comments_url":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957/comments","review_comment_url":"https://api.github.com/repos/yarpc/yarpc-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yarpc/yarpc-go/issues/957/comments","statuses_url":"https://api.github.com/repos/yarpc/yarpc-go/statuses/ba197c207899a1ae53625ed501a0d0f633c8c876","head":{"label":"yarpc:config-peers-http","ref":"config-peers-http","sha":"ba197c207899a1ae53625ed501a0d0f633c8c876","user":{"login":"yarpc","id":16569504,"avatar_url":"https://avatars1.githubusercontent.com/u/16569504?v=3","gravatar_id":"","url":"https://api.github.com/users/yarpc","html_url":"https://github.com/yarpc","followers_url":"https://api.github.com/users/yarpc/followers","following_url":"https://api.github.com/users/yarpc/following{/other_user}","gists_url":"https://api.github.com/users/yarpc/gists{/gist_id}","starred_url":"https://api.github.com/users/yarpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarpc/subscriptions","organizations_url":"https://api.github.com/users/yarpc/orgs","repos_url":"https://api.github.com/users/yarpc/repos","events_url":"https://api.github.com/users/yarpc/events{/privacy}","received_events_url":"https://api.github.com/users/yarpc/received_events","type":"Organization","site_admin":false},"repo":{"id":50390111,"name":"yarpc-go","full_name":"yarpc/yarpc-go","owner":{"login":"yarpc","id":16569504,"avatar_url":"https://avatars1.githubusercontent.com/u/16569504?v=3","gravatar_id":"","url":"https://api.github.com/users/yarpc","html_url":"https://github.com/yarpc","followers_url":"https://api.github.com/users/yarpc/followers","following_url":"https://api.github.com/users/yarpc/following{/other_user}","gists_url":"https://api.github.com/users/yarpc/gists{/gist_id}","starred_url":"https://api.github.com/users/yarpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarpc/subscriptions","organizations_url":"https://api.github.com/users/yarpc/orgs","repos_url":"https://api.github.com/users/yarpc/repos","events_url":"https://api.github.com/users/yarpc/events{/privacy}","received_events_url":"https://api.github.com/users/yarpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yarpc/yarpc-go","description":"YARPC for Go - message passing for microservices","fork":false,"url":"https://api.github.com/repos/yarpc/yarpc-go","forks_url":"https://api.github.com/repos/yarpc/yarpc-go/forks","keys_url":"https://api.github.com/repos/yarpc/yarpc-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarpc/yarpc-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarpc/yarpc-go/teams","hooks_url":"https://api.github.com/repos/yarpc/yarpc-go/hooks","issue_events_url":"https://api.github.com/repos/yarpc/yarpc-go/issues/events{/number}","events_url":"https://api.github.com/repos/yarpc/yarpc-go/events","assignees_url":"https://api.github.com/repos/yarpc/yarpc-go/assignees{/user}","branches_url":"https://api.github.com/repos/yarpc/yarpc-go/branches{/branch}","tags_url":"https://api.github.com/repos/yarpc/yarpc-go/tags","blobs_url":"https://api.github.com/repos/yarpc/yarpc-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarpc/yarpc-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarpc/yarpc-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarpc/yarpc-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarpc/yarpc-go/statuses/{sha}","languages_url":"https://api.github.com/repos/yarpc/yarpc-go/languages","stargazers_url":"https://api.github.com/repos/yarpc/yarpc-go/stargazers","contributors_url":"https://api.github.com/repos/yarpc/yarpc-go/contributors","subscribers_url":"https://api.github.com/repos/yarpc/yarpc-go/subscribers","subscription_url":"https://api.github.com/repos/yarpc/yarpc-go/subscription","commits_url":"https://api.github.com/repos/yarpc/yarpc-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarpc/yarpc-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarpc/yarpc-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarpc/yarpc-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarpc/yarpc-go/contents/{+path}","compare_url":"https://api.github.com/repos/yarpc/yarpc-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarpc/yarpc-go/merges","archive_url":"https://api.github.com/repos/yarpc/yarpc-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarpc/yarpc-go/downloads","issues_url":"https://api.github.com/repos/yarpc/yarpc-go/issues{/number}","pulls_url":"https://api.github.com/repos/yarpc/yarpc-go/pulls{/number}","milestones_url":"https://api.github.com/repos/yarpc/yarpc-go/milestones{/number}","notifications_url":"https://api.github.com/repos/yarpc/yarpc-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarpc/yarpc-go/labels{/name}","releases_url":"https://api.github.com/repos/yarpc/yarpc-go/releases{/id}","deployments_url":"https://api.github.com/repos/yarpc/yarpc-go/deployments","created_at":"2016-01-26T00:04:14Z","updated_at":"2017-04-22T22:09:42Z","pushed_at":"2017-04-25T04:28:29Z","git_url":"git://github.com/yarpc/yarpc-go.git","ssh_url":"git@github.com:yarpc/yarpc-go.git","clone_url":"https://github.com/yarpc/yarpc-go.git","svn_url":"https://github.com/yarpc/yarpc-go","homepage":"","size":6108,"stargazers_count":47,"watchers_count":47,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":89,"forks":5,"open_issues":89,"watchers":47,"default_branch":"dev"}},"base":{"label":"yarpc:config-peers","ref":"config-peers","sha":"569a42abebd5bb5b02f591d51dae9a866c0e024d","user":{"login":"yarpc","id":16569504,"avatar_url":"https://avatars1.githubusercontent.com/u/16569504?v=3","gravatar_id":"","url":"https://api.github.com/users/yarpc","html_url":"https://github.com/yarpc","followers_url":"https://api.github.com/users/yarpc/followers","following_url":"https://api.github.com/users/yarpc/following{/other_user}","gists_url":"https://api.github.com/users/yarpc/gists{/gist_id}","starred_url":"https://api.github.com/users/yarpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarpc/subscriptions","organizations_url":"https://api.github.com/users/yarpc/orgs","repos_url":"https://api.github.com/users/yarpc/repos","events_url":"https://api.github.com/users/yarpc/events{/privacy}","received_events_url":"https://api.github.com/users/yarpc/received_events","type":"Organization","site_admin":false},"repo":{"id":50390111,"name":"yarpc-go","full_name":"yarpc/yarpc-go","owner":{"login":"yarpc","id":16569504,"avatar_url":"https://avatars1.githubusercontent.com/u/16569504?v=3","gravatar_id":"","url":"https://api.github.com/users/yarpc","html_url":"https://github.com/yarpc","followers_url":"https://api.github.com/users/yarpc/followers","following_url":"https://api.github.com/users/yarpc/following{/other_user}","gists_url":"https://api.github.com/users/yarpc/gists{/gist_id}","starred_url":"https://api.github.com/users/yarpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarpc/subscriptions","organizations_url":"https://api.github.com/users/yarpc/orgs","repos_url":"https://api.github.com/users/yarpc/repos","events_url":"https://api.github.com/users/yarpc/events{/privacy}","received_events_url":"https://api.github.com/users/yarpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yarpc/yarpc-go","description":"YARPC for Go - message passing for microservices","fork":false,"url":"https://api.github.com/repos/yarpc/yarpc-go","forks_url":"https://api.github.com/repos/yarpc/yarpc-go/forks","keys_url":"https://api.github.com/repos/yarpc/yarpc-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarpc/yarpc-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarpc/yarpc-go/teams","hooks_url":"https://api.github.com/repos/yarpc/yarpc-go/hooks","issue_events_url":"https://api.github.com/repos/yarpc/yarpc-go/issues/events{/number}","events_url":"https://api.github.com/repos/yarpc/yarpc-go/events","assignees_url":"https://api.github.com/repos/yarpc/yarpc-go/assignees{/user}","branches_url":"https://api.github.com/repos/yarpc/yarpc-go/branches{/branch}","tags_url":"https://api.github.com/repos/yarpc/yarpc-go/tags","blobs_url":"https://api.github.com/repos/yarpc/yarpc-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarpc/yarpc-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarpc/yarpc-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarpc/yarpc-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarpc/yarpc-go/statuses/{sha}","languages_url":"https://api.github.com/repos/yarpc/yarpc-go/languages","stargazers_url":"https://api.github.com/repos/yarpc/yarpc-go/stargazers","contributors_url":"https://api.github.com/repos/yarpc/yarpc-go/contributors","subscribers_url":"https://api.github.com/repos/yarpc/yarpc-go/subscribers","subscription_url":"https://api.github.com/repos/yarpc/yarpc-go/subscription","commits_url":"https://api.github.com/repos/yarpc/yarpc-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarpc/yarpc-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarpc/yarpc-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarpc/yarpc-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarpc/yarpc-go/contents/{+path}","compare_url":"https://api.github.com/repos/yarpc/yarpc-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarpc/yarpc-go/merges","archive_url":"https://api.github.com/repos/yarpc/yarpc-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarpc/yarpc-go/downloads","issues_url":"https://api.github.com/repos/yarpc/yarpc-go/issues{/number}","pulls_url":"https://api.github.com/repos/yarpc/yarpc-go/pulls{/number}","milestones_url":"https://api.github.com/repos/yarpc/yarpc-go/milestones{/number}","notifications_url":"https://api.github.com/repos/yarpc/yarpc-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarpc/yarpc-go/labels{/name}","releases_url":"https://api.github.com/repos/yarpc/yarpc-go/releases{/id}","deployments_url":"https://api.github.com/repos/yarpc/yarpc-go/deployments","created_at":"2016-01-26T00:04:14Z","updated_at":"2017-04-22T22:09:42Z","pushed_at":"2017-04-25T04:28:29Z","git_url":"git://github.com/yarpc/yarpc-go.git","ssh_url":"git@github.com:yarpc/yarpc-go.git","clone_url":"https://github.com/yarpc/yarpc-go.git","svn_url":"https://github.com/yarpc/yarpc-go","homepage":"","size":6108,"stargazers_count":47,"watchers_count":47,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":89,"forks":5,"open_issues":89,"watchers":47,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957"},"html":{"href":"https://github.com/yarpc/yarpc-go/pull/957"},"issue":{"href":"https://api.github.com/repos/yarpc/yarpc-go/issues/957"},"comments":{"href":"https://api.github.com/repos/yarpc/yarpc-go/issues/957/comments"},"review_comments":{"href":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957/comments"},"review_comment":{"href":"https://api.github.com/repos/yarpc/yarpc-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yarpc/yarpc-go/pulls/957/commits"},"statuses":{"href":"https://api.github.com/repos/yarpc/yarpc-go/statuses/ba197c207899a1ae53625ed501a0d0f633c8c876"}}}}
{"actor":{"display_login":"abhinav"}}