{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/37760595","id":37760595,"diff_hunk":"@@ -2154,3 +2154,32 @@ type RangeAllocation struct {\n \t// a single allocated address (the fifth bit on CIDR 10.0.0.0/8 is 10.0.0.4).\n \tData []byte `json:\"data\"`\n }\n+\n+// LockSpec is the specification of a resource lock.\n+type LockSpec struct {\n+\t// Who currently has the lock.\n+\tHeldBy string `json:\"heldby\"`\n+\t// How long the lock is valid.\n+\tLeaseTime uint64 `json:\"duration\"`\n+\t// When the lock was first acquired.\n+\tAcquiredTime string `json:\"atime,omitempty\"`\n+\t// When the lock was last renewed.\n+\tRenewTime string `json:\"rtime,omitempty\"`\n+}\n+\n+// Lock represents the configuration of a resource lock.\n+type Lock struct {","path":"pkg/api/types.go","position":18,"original_position":18,"commit_id":"ae259f3adb9440aca07d338cd12d1d7d0317756c","original_commit_id":"2225f21c0c0c2cee1d201cbf5db87fb963a8beb6","user":{"login":"rrati","id":87555,"avatar_url":"https://avatars.githubusercontent.com/u/87555?v=3","gravatar_id":"","url":"https://api.github.com/users/rrati","html_url":"https://github.com/rrati","followers_url":"https://api.github.com/users/rrati/followers","following_url":"https://api.github.com/users/rrati/following{/other_user}","gists_url":"https://api.github.com/users/rrati/gists{/gist_id}","starred_url":"https://api.github.com/users/rrati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrati/subscriptions","organizations_url":"https://api.github.com/users/rrati/orgs","repos_url":"https://api.github.com/users/rrati/repos","events_url":"https://api.github.com/users/rrati/events{/privacy}","received_events_url":"https://api.github.com/users/rrati/received_events","type":"User","site_admin":false},"body":"The name isn't that big a deal, but imo Lock is more correct than Lease for an object.  The structure that is implemented is a Lock with an expiration.  You can use that structure/object to perform lease functionality, but imo the base object is a lock.\r\n\r\nI haven't had a chance to look at the etcd stuff yet though so I can't speak to how the semantics might change with the upcoming etcd changes.","created_at":"2015-08-24T15:01:41Z","updated_at":"2015-08-24T15:01:41Z","html_url":"https://github.com/kubernetes/kubernetes/pull/13037#discussion_r37760595","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/37760595"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/13037#discussion_r37760595"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037","id":43057684,"html_url":"https://github.com/kubernetes/kubernetes/pull/13037","diff_url":"https://github.com/kubernetes/kubernetes/pull/13037.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/13037.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13037","number":13037,"state":"open","locked":false,"title":"HA Proposal PART 1 : Lease/Lock API Server Components.","user":{"login":"jayunit100","id":826111,"avatar_url":"https://avatars.githubusercontent.com/u/826111?v=3","gravatar_id":"","url":"https://api.github.com/users/jayunit100","html_url":"https://github.com/jayunit100","followers_url":"https://api.github.com/users/jayunit100/followers","following_url":"https://api.github.com/users/jayunit100/following{/other_user}","gists_url":"https://api.github.com/users/jayunit100/gists{/gist_id}","starred_url":"https://api.github.com/users/jayunit100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayunit100/subscriptions","organizations_url":"https://api.github.com/users/jayunit100/orgs","repos_url":"https://api.github.com/users/jayunit100/repos","events_url":"https://api.github.com/users/jayunit100/events{/privacy}","received_events_url":"https://api.github.com/users/jayunit100/received_events","type":"User","site_admin":false},"body":"PR 1 of 2: Lock+Lease API","created_at":"2015-08-21T16:47:51Z","updated_at":"2015-08-24T15:01:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13037/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ae259f3adb9440aca07d338cd12d1d7d0317756c","head":{"label":"roofmonkey:SCALE-HA-LOCK_LEASE","ref":"SCALE-HA-LOCK_LEASE","sha":"ae259f3adb9440aca07d338cd12d1d7d0317756c","user":{"login":"roofmonkey","id":3969080,"avatar_url":"https://avatars.githubusercontent.com/u/3969080?v=3","gravatar_id":"","url":"https://api.github.com/users/roofmonkey","html_url":"https://github.com/roofmonkey","followers_url":"https://api.github.com/users/roofmonkey/followers","following_url":"https://api.github.com/users/roofmonkey/following{/other_user}","gists_url":"https://api.github.com/users/roofmonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/roofmonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roofmonkey/subscriptions","organizations_url":"https://api.github.com/users/roofmonkey/orgs","repos_url":"https://api.github.com/users/roofmonkey/repos","events_url":"https://api.github.com/users/roofmonkey/events{/privacy}","received_events_url":"https://api.github.com/users/roofmonkey/received_events","type":"Organization","site_admin":false},"repo":{"id":39896000,"name":"kubernetes","full_name":"roofmonkey/kubernetes","owner":{"login":"roofmonkey","id":3969080,"avatar_url":"https://avatars.githubusercontent.com/u/3969080?v=3","gravatar_id":"","url":"https://api.github.com/users/roofmonkey","html_url":"https://github.com/roofmonkey","followers_url":"https://api.github.com/users/roofmonkey/followers","following_url":"https://api.github.com/users/roofmonkey/following{/other_user}","gists_url":"https://api.github.com/users/roofmonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/roofmonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roofmonkey/subscriptions","organizations_url":"https://api.github.com/users/roofmonkey/orgs","repos_url":"https://api.github.com/users/roofmonkey/repos","events_url":"https://api.github.com/users/roofmonkey/events{/privacy}","received_events_url":"https://api.github.com/users/roofmonkey/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/roofmonkey/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/roofmonkey/kubernetes","forks_url":"https://api.github.com/repos/roofmonkey/kubernetes/forks","keys_url":"https://api.github.com/repos/roofmonkey/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roofmonkey/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roofmonkey/kubernetes/teams","hooks_url":"https://api.github.com/repos/roofmonkey/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/roofmonkey/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/roofmonkey/kubernetes/events","assignees_url":"https://api.github.com/repos/roofmonkey/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/roofmonkey/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/roofmonkey/kubernetes/tags","blobs_url":"https://api.github.com/repos/roofmonkey/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roofmonkey/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roofmonkey/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/roofmonkey/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roofmonkey/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/roofmonkey/kubernetes/languages","stargazers_url":"https://api.github.com/repos/roofmonkey/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/roofmonkey/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/roofmonkey/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/roofmonkey/kubernetes/subscription","commits_url":"https://api.github.com/repos/roofmonkey/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/roofmonkey/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/roofmonkey/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/roofmonkey/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/roofmonkey/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/roofmonkey/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roofmonkey/kubernetes/merges","archive_url":"https://api.github.com/repos/roofmonkey/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roofmonkey/kubernetes/downloads","issues_url":"https://api.github.com/repos/roofmonkey/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/roofmonkey/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/roofmonkey/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/roofmonkey/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roofmonkey/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/roofmonkey/kubernetes/releases{/id}","created_at":"2015-07-29T13:52:02Z","updated_at":"2015-07-29T13:52:09Z","pushed_at":"2015-08-24T13:33:42Z","git_url":"git://github.com/roofmonkey/kubernetes.git","ssh_url":"git@github.com:roofmonkey/kubernetes.git","clone_url":"https://github.com/roofmonkey/kubernetes.git","svn_url":"https://github.com/roofmonkey/kubernetes","homepage":"http://kubernetes.io","size":99285,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"5f36c07111f5aff2a1a611f05e9f34314cbd4b50","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-08-24T13:30:19Z","pushed_at":"2015-08-24T14:46:40Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":358725,"stargazers_count":9867,"watchers_count":9867,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2382,"mirror_url":null,"open_issues_count":1782,"forks":2382,"open_issues":1782,"watchers":9867,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/13037"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/13037"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/13037/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13037/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ae259f3adb9440aca07d338cd12d1d7d0317756c"}}}}