{"action":"created","comment":{"url":"https://api.github.com/repos/docker/swarm/pulls/comments/30648877","id":30648877,"diff_hunk":"@@ -133,12 +133,12 @@ func parse(rawurl string) (string, string) {\n \n // New returns a new Discovery given a URL and heartbeat settings.\n // Returns an error if the URL scheme is not supported.\n-func New(rawurl string, heartbeat time.Duration) (Discovery, error) {\n+func New(rawurl string, heartbeat time.Duration, ttl time.Duration) (Discovery, error) {","path":"discovery/discovery.go","position":14,"original_position":14,"commit_id":"4537b9f2ba55d3ddec7f88698dae1f03243a5ada","original_commit_id":"4537b9f2ba55d3ddec7f88698dae1f03243a5ada","user":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"body":"Comment above","created_at":"2015-05-19T21:23:20Z","updated_at":"2015-05-19T21:23:20Z","html_url":"https://github.com/docker/swarm/pull/801#discussion_r30648877","pull_request_url":"https://api.github.com/repos/docker/swarm/pulls/801","_links":{"self":{"href":"https://api.github.com/repos/docker/swarm/pulls/comments/30648877"},"html":{"href":"https://github.com/docker/swarm/pull/801#discussion_r30648877"},"pull_request":{"href":"https://api.github.com/repos/docker/swarm/pulls/801"}}},"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/801","id":35553756,"html_url":"https://github.com/docker/swarm/pull/801","diff_url":"https://github.com/docker/swarm/pull/801.diff","patch_url":"https://github.com/docker/swarm/pull/801.patch","issue_url":"https://api.github.com/repos/docker/swarm/issues/801","number":801,"state":"open","locked":false,"title":"store: Add node Ephemeral support","user":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"body":"Adds an `Ephemeral` flag to Consul, Zookeeper and Etcd for usage with Discovery.\r\n\r\nThis PR is mostly made to discuss about what is the best approach: rely on TTLs or use an Ephemeral flag. In both cases there are trade-offs to be made on the semantics of both operations:\r\n\r\n- If we use an Ephemeral flag, we hide etcd's lack of support for Ephemeral by the use of a periodic `Set` that renews the TTL (What this PR does)\r\n- If we use a TTL, we must hide zookeeper's lack of support for TTL behind the use of an Ephemeral flag.","created_at":"2015-05-15T21:45:01Z","updated_at":"2015-05-19T21:23:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43162c7da5f788bb562c8da2dc5a5ea6380284b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarm/pulls/801/commits","review_comments_url":"https://api.github.com/repos/docker/swarm/pulls/801/comments","review_comment_url":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarm/issues/801/comments","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/4537b9f2ba55d3ddec7f88698dae1f03243a5ada","head":{"label":"abronan:add_ephemeral_support","ref":"add_ephemeral_support","sha":"4537b9f2ba55d3ddec7f88698dae1f03243a5ada","user":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"repo":{"id":32493940,"name":"swarm","full_name":"abronan/swarm","owner":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abronan/swarm","description":"Swarm: a Docker-native clustering system","fork":true,"url":"https://api.github.com/repos/abronan/swarm","forks_url":"https://api.github.com/repos/abronan/swarm/forks","keys_url":"https://api.github.com/repos/abronan/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abronan/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abronan/swarm/teams","hooks_url":"https://api.github.com/repos/abronan/swarm/hooks","issue_events_url":"https://api.github.com/repos/abronan/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/abronan/swarm/events","assignees_url":"https://api.github.com/repos/abronan/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/abronan/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/abronan/swarm/tags","blobs_url":"https://api.github.com/repos/abronan/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abronan/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abronan/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/abronan/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abronan/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/abronan/swarm/languages","stargazers_url":"https://api.github.com/repos/abronan/swarm/stargazers","contributors_url":"https://api.github.com/repos/abronan/swarm/contributors","subscribers_url":"https://api.github.com/repos/abronan/swarm/subscribers","subscription_url":"https://api.github.com/repos/abronan/swarm/subscription","commits_url":"https://api.github.com/repos/abronan/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/abronan/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/abronan/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/abronan/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/abronan/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/abronan/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abronan/swarm/merges","archive_url":"https://api.github.com/repos/abronan/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abronan/swarm/downloads","issues_url":"https://api.github.com/repos/abronan/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/abronan/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/abronan/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/abronan/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abronan/swarm/labels{/name}","releases_url":"https://api.github.com/repos/abronan/swarm/releases{/id}","created_at":"2015-03-19T01:27:04Z","updated_at":"2015-04-14T10:52:26Z","pushed_at":"2015-05-19T19:57:54Z","git_url":"git://github.com/abronan/swarm.git","ssh_url":"git@github.com:abronan/swarm.git","clone_url":"https://github.com/abronan/swarm.git","svn_url":"https://github.com/abronan/swarm","homepage":"","size":5069,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"d5915b2a092722d3510f5054f9c99c9e1fee0c4b","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":19360616,"name":"swarm","full_name":"docker/swarm","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/swarm","description":"Swarm: a Docker-native clustering system","fork":false,"url":"https://api.github.com/repos/docker/swarm","forks_url":"https://api.github.com/repos/docker/swarm/forks","keys_url":"https://api.github.com/repos/docker/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarm/teams","hooks_url":"https://api.github.com/repos/docker/swarm/hooks","issue_events_url":"https://api.github.com/repos/docker/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarm/events","assignees_url":"https://api.github.com/repos/docker/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarm/tags","blobs_url":"https://api.github.com/repos/docker/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarm/languages","stargazers_url":"https://api.github.com/repos/docker/swarm/stargazers","contributors_url":"https://api.github.com/repos/docker/swarm/contributors","subscribers_url":"https://api.github.com/repos/docker/swarm/subscribers","subscription_url":"https://api.github.com/repos/docker/swarm/subscription","commits_url":"https://api.github.com/repos/docker/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarm/merges","archive_url":"https://api.github.com/repos/docker/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarm/downloads","issues_url":"https://api.github.com/repos/docker/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarm/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarm/releases{/id}","created_at":"2014-05-01T23:15:17Z","updated_at":"2015-05-19T17:25:06Z","pushed_at":"2015-05-19T19:57:55Z","git_url":"git://github.com/docker/swarm.git","ssh_url":"git@github.com:docker/swarm.git","clone_url":"https://github.com/docker/swarm.git","svn_url":"https://github.com/docker/swarm","homepage":"","size":13868,"stargazers_count":2684,"watchers_count":2684,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":313,"mirror_url":null,"open_issues_count":89,"forks":313,"open_issues":89,"watchers":2684,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarm/pulls/801"},"html":{"href":"https://github.com/docker/swarm/pull/801"},"issue":{"href":"https://api.github.com/repos/docker/swarm/issues/801"},"comments":{"href":"https://api.github.com/repos/docker/swarm/issues/801/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarm/pulls/801/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarm/pulls/801/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarm/statuses/4537b9f2ba55d3ddec7f88698dae1f03243a5ada"}}}}