{"action":"created","comment":{"url":"https://api.github.com/repos/spotify/helios/pulls/comments/44061148","id":44061148,"diff_hunk":"@@ -77,20 +73,16 @@\n \n   private static final Logger log = LoggerFactory.getLogger(DefaultRequestDispatcher.class);\n \n-  private static final long RETRY_TIMEOUT_MILLIS = SECONDS.toMillis(60);\n   private static final long HTTP_TIMEOUT_MILLIS = SECONDS.toMillis(10);\n-  private static final List<String> VALID_PROTOCOLS = ImmutableList.of(\"http\", \"https\");\n-  private static final String VALID_PROTOCOLS_STR =\n-      String.format(\"[%s]\", Joiner.on(\"|\").join(VALID_PROTOCOLS));\n \n-  private final Supplier<List<URI>> endpointSupplier;\n+  private final Iterator<Endpoint> endpointIterator;","path":"helios-client/src/main/java/com/spotify/helios/client/DefaultRequestDispatcher.java","position":50,"original_position":48,"commit_id":"ac510b3edf17d3e4d8888db69e87bb33fef79cb5","original_commit_id":"b1d039c5e26dfcd5be55a78f1aa869efacb46c33","user":{"login":"mattnworb","id":113840,"avatar_url":"https://avatars.githubusercontent.com/u/113840?v=3","gravatar_id":"","url":"https://api.github.com/users/mattnworb","html_url":"https://github.com/mattnworb","followers_url":"https://api.github.com/users/mattnworb/followers","following_url":"https://api.github.com/users/mattnworb/following{/other_user}","gists_url":"https://api.github.com/users/mattnworb/gists{/gist_id}","starred_url":"https://api.github.com/users/mattnworb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattnworb/subscriptions","organizations_url":"https://api.github.com/users/mattnworb/orgs","repos_url":"https://api.github.com/users/mattnworb/repos","events_url":"https://api.github.com/users/mattnworb/events{/privacy}","received_events_url":"https://api.github.com/users/mattnworb/received_events","type":"User","site_admin":false},"body":"I think that declaring this field as `EndpointIterator` would be best, since it communicates that the code only works with an instance of `EndpointIterator` rather than any `Iterator<Endpoint>`.","created_at":"2015-11-05T19:58:22Z","updated_at":"2015-11-05T19:58:22Z","html_url":"https://github.com/spotify/helios/pull/728#discussion_r44061148","pull_request_url":"https://api.github.com/repos/spotify/helios/pulls/728","_links":{"self":{"href":"https://api.github.com/repos/spotify/helios/pulls/comments/44061148"},"html":{"href":"https://github.com/spotify/helios/pull/728#discussion_r44061148"},"pull_request":{"href":"https://api.github.com/repos/spotify/helios/pulls/728"}}},"pull_request":{"url":"https://api.github.com/repos/spotify/helios/pulls/728","id":49380257,"html_url":"https://github.com/spotify/helios/pull/728","diff_url":"https://github.com/spotify/helios/pull/728.diff","patch_url":"https://github.com/spotify/helios/pull/728.patch","issue_url":"https://api.github.com/repos/spotify/helios/issues/728","number":728,"state":"open","locked":false,"title":"Move URI + IP logic from RequestDispatcher to Endpoint","user":{"login":"davidxia","id":480621,"avatar_url":"https://avatars.githubusercontent.com/u/480621?v=3","gravatar_id":"","url":"https://api.github.com/users/davidxia","html_url":"https://github.com/davidxia","followers_url":"https://api.github.com/users/davidxia/followers","following_url":"https://api.github.com/users/davidxia/following{/other_user}","gists_url":"https://api.github.com/users/davidxia/gists{/gist_id}","starred_url":"https://api.github.com/users/davidxia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidxia/subscriptions","organizations_url":"https://api.github.com/users/davidxia/orgs","repos_url":"https://api.github.com/users/davidxia/repos","events_url":"https://api.github.com/users/davidxia/events{/privacy}","received_events_url":"https://api.github.com/users/davidxia/received_events","type":"User","site_admin":false},"body":"The Endpoint object associates a URI with its resolved IP addresses.\nMoving hostname-to-IP resolution logic out of DefaultRequestDispatcher\nand into the static factory class Endpoints simplifies DefaultRequestDispatcher\nand makes this logic more testable. DefaultRequestDispatcher is just\nresponsible for sending requests given a list of Endpoints.","created_at":"2015-11-01T20:38:27Z","updated_at":"2015-11-05T19:58:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96ea80572c9fef2cdfe15c12ef56c017fea2f7c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spotify/helios/pulls/728/commits","review_comments_url":"https://api.github.com/repos/spotify/helios/pulls/728/comments","review_comment_url":"https://api.github.com/repos/spotify/helios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spotify/helios/issues/728/comments","statuses_url":"https://api.github.com/repos/spotify/helios/statuses/ac510b3edf17d3e4d8888db69e87bb33fef79cb5","head":{"label":"spotify:endpoint","ref":"endpoint","sha":"ac510b3edf17d3e4d8888db69e87bb33fef79cb5","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":20171642,"name":"helios","full_name":"spotify/helios","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/helios","description":"Docker container orchestration platform","fork":false,"url":"https://api.github.com/repos/spotify/helios","forks_url":"https://api.github.com/repos/spotify/helios/forks","keys_url":"https://api.github.com/repos/spotify/helios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/helios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/helios/teams","hooks_url":"https://api.github.com/repos/spotify/helios/hooks","issue_events_url":"https://api.github.com/repos/spotify/helios/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/helios/events","assignees_url":"https://api.github.com/repos/spotify/helios/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/helios/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/helios/tags","blobs_url":"https://api.github.com/repos/spotify/helios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/helios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/helios/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/helios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/helios/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/helios/languages","stargazers_url":"https://api.github.com/repos/spotify/helios/stargazers","contributors_url":"https://api.github.com/repos/spotify/helios/contributors","subscribers_url":"https://api.github.com/repos/spotify/helios/subscribers","subscription_url":"https://api.github.com/repos/spotify/helios/subscription","commits_url":"https://api.github.com/repos/spotify/helios/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/helios/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/helios/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/helios/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/helios/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/helios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/helios/merges","archive_url":"https://api.github.com/repos/spotify/helios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/helios/downloads","issues_url":"https://api.github.com/repos/spotify/helios/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/helios/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/helios/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/helios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/helios/labels{/name}","releases_url":"https://api.github.com/repos/spotify/helios/releases{/id}","created_at":"2014-05-26T02:29:06Z","updated_at":"2015-11-05T17:23:34Z","pushed_at":"2015-11-05T19:39:10Z","git_url":"git://github.com/spotify/helios.git","ssh_url":"git@github.com:spotify/helios.git","clone_url":"https://github.com/spotify/helios.git","svn_url":"https://github.com/spotify/helios","homepage":null,"size":13578,"stargazers_count":1102,"watchers_count":1102,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":25,"forks":81,"open_issues":25,"watchers":1102,"default_branch":"master"}},"base":{"label":"spotify:master","ref":"master","sha":"55680ab5980096f34a5b46fbbff37f71b778159f","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":20171642,"name":"helios","full_name":"spotify/helios","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/helios","description":"Docker container orchestration platform","fork":false,"url":"https://api.github.com/repos/spotify/helios","forks_url":"https://api.github.com/repos/spotify/helios/forks","keys_url":"https://api.github.com/repos/spotify/helios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/helios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/helios/teams","hooks_url":"https://api.github.com/repos/spotify/helios/hooks","issue_events_url":"https://api.github.com/repos/spotify/helios/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/helios/events","assignees_url":"https://api.github.com/repos/spotify/helios/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/helios/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/helios/tags","blobs_url":"https://api.github.com/repos/spotify/helios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/helios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/helios/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/helios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/helios/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/helios/languages","stargazers_url":"https://api.github.com/repos/spotify/helios/stargazers","contributors_url":"https://api.github.com/repos/spotify/helios/contributors","subscribers_url":"https://api.github.com/repos/spotify/helios/subscribers","subscription_url":"https://api.github.com/repos/spotify/helios/subscription","commits_url":"https://api.github.com/repos/spotify/helios/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/helios/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/helios/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/helios/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/helios/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/helios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/helios/merges","archive_url":"https://api.github.com/repos/spotify/helios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/helios/downloads","issues_url":"https://api.github.com/repos/spotify/helios/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/helios/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/helios/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/helios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/helios/labels{/name}","releases_url":"https://api.github.com/repos/spotify/helios/releases{/id}","created_at":"2014-05-26T02:29:06Z","updated_at":"2015-11-05T17:23:34Z","pushed_at":"2015-11-05T19:39:10Z","git_url":"git://github.com/spotify/helios.git","ssh_url":"git@github.com:spotify/helios.git","clone_url":"https://github.com/spotify/helios.git","svn_url":"https://github.com/spotify/helios","homepage":null,"size":13578,"stargazers_count":1102,"watchers_count":1102,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":25,"forks":81,"open_issues":25,"watchers":1102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spotify/helios/pulls/728"},"html":{"href":"https://github.com/spotify/helios/pull/728"},"issue":{"href":"https://api.github.com/repos/spotify/helios/issues/728"},"comments":{"href":"https://api.github.com/repos/spotify/helios/issues/728/comments"},"review_comments":{"href":"https://api.github.com/repos/spotify/helios/pulls/728/comments"},"review_comment":{"href":"https://api.github.com/repos/spotify/helios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spotify/helios/pulls/728/commits"},"statuses":{"href":"https://api.github.com/repos/spotify/helios/statuses/ac510b3edf17d3e4d8888db69e87bb33fef79cb5"}}}}