{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/42438545","id":42438545,"diff_hunk":"@@ -0,0 +1,153 @@\n+# Client: layering and package structure\n+\n+## Desired layers\n+\n+### Transport\n+\n+The transport layer is concerned with round-tripping requests to an apiserver\n+somewhere. It consumes a Config object with options appropriate for this.\n+(That's most of the current client.Config structure.)\n+\n+Third parties (e.g., open shift) may have their own implementation.\n+\n+Transport delivers an object that implements http's RoundTripper interface\n+and/or can be used in place of http.DefaultClient to route requests.\n+\n+Transport objects are safe for concurrent use, and are cached and reused by\n+subsequent layers.\n+\n+Tentative name: \"Transport\".\n+\n+Action items:\n+* Split out of current client package into a new package. (@krousey)\n+\n+### RESTClient/request.go\n+\n+RESTClient consumes a Transport, a group, and a version, and produces something\n+that implements the interface currently in request.go. That is, with a\n+RESTClient, you can write chains of calls like: c.Get().Path(p).Param(\"name\",\n+\"value\").Do()\n+\n+The group and version may be empty when constructing a RESTClient. This is valid\n+for executing discovery commands. The group and version may be overridable with\n+a function call.\n+\n+RESTClients may have semantic information built in. For example, if the","path":"docs/proposals/client-package-structure.md","position":null,"original_position":35,"commit_id":"a83e9fe11605d0d03c4c4603ca640ae72085cab9","original_commit_id":"50ca09edc2bb31dcb9bbda0ff7bb924fab7e0b29","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"As Clayton points out, we should keep as much semantic info in the Codec as possible.","created_at":"2015-10-19T23:19:55Z","updated_at":"2015-10-19T23:19:55Z","html_url":"https://github.com/kubernetes/kubernetes/pull/15730#discussion_r42438545","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/42438545"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/15730#discussion_r42438545"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730","id":47839938,"html_url":"https://github.com/kubernetes/kubernetes/pull/15730","diff_url":"https://github.com/kubernetes/kubernetes/pull/15730.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/15730.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15730","number":15730,"state":"open","locked":false,"title":"Client package proposal","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"I'm accumulating everything I've learned from talking with people about the client into a single proposal to make sure everyone is on the same page.\r\n\r\n@smarterclayton @krousey @caesarxuchao ","created_at":"2015-10-15T20:51:16Z","updated_at":"2015-10-19T23:19:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4cde2ae60d0b4f56928519dcb3b80e4de7fe1dd","assignee":{"login":"krousey","id":157083,"avatar_url":"https://avatars.githubusercontent.com/u/157083?v=3","gravatar_id":"","url":"https://api.github.com/users/krousey","html_url":"https://github.com/krousey","followers_url":"https://api.github.com/users/krousey/followers","following_url":"https://api.github.com/users/krousey/following{/other_user}","gists_url":"https://api.github.com/users/krousey/gists{/gist_id}","starred_url":"https://api.github.com/users/krousey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krousey/subscriptions","organizations_url":"https://api.github.com/users/krousey/orgs","repos_url":"https://api.github.com/users/krousey/repos","events_url":"https://api.github.com/users/krousey/events{/privacy}","received_events_url":"https://api.github.com/users/krousey/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/15","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.2","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/15/labels","id":1278499,"number":15,"title":"v1.2","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.2","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":0,"state":"open","created_at":"2015-08-29T03:54:16Z","updated_at":"2015-10-16T16:26:41Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15730/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a83e9fe11605d0d03c4c4603ca640ae72085cab9","head":{"label":"lavalamp:client-doc","ref":"client-doc","sha":"a83e9fe11605d0d03c4c4603ca640ae72085cab9","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"repo":{"id":20749157,"name":"kubernetes","full_name":"lavalamp/kubernetes","owner":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lavalamp/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/lavalamp/kubernetes","forks_url":"https://api.github.com/repos/lavalamp/kubernetes/forks","keys_url":"https://api.github.com/repos/lavalamp/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lavalamp/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lavalamp/kubernetes/teams","hooks_url":"https://api.github.com/repos/lavalamp/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/lavalamp/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/lavalamp/kubernetes/events","assignees_url":"https://api.github.com/repos/lavalamp/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/lavalamp/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/lavalamp/kubernetes/tags","blobs_url":"https://api.github.com/repos/lavalamp/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lavalamp/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lavalamp/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/lavalamp/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lavalamp/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/lavalamp/kubernetes/languages","stargazers_url":"https://api.github.com/repos/lavalamp/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/lavalamp/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/lavalamp/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/lavalamp/kubernetes/subscription","commits_url":"https://api.github.com/repos/lavalamp/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/lavalamp/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/lavalamp/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/lavalamp/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/lavalamp/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/lavalamp/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lavalamp/kubernetes/merges","archive_url":"https://api.github.com/repos/lavalamp/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lavalamp/kubernetes/downloads","issues_url":"https://api.github.com/repos/lavalamp/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/lavalamp/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/lavalamp/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/lavalamp/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lavalamp/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/lavalamp/kubernetes/releases{/id}","created_at":"2014-06-12T00:36:13Z","updated_at":"2014-12-05T22:04:19Z","pushed_at":"2015-10-19T23:18:48Z","git_url":"git://github.com/lavalamp/kubernetes.git","ssh_url":"git@github.com:lavalamp/kubernetes.git","clone_url":"https://github.com/lavalamp/kubernetes.git","svn_url":"https://github.com/lavalamp/kubernetes","homepage":null,"size":118666,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"ae0ea6496e27d4597e2b406e8b054851145a7ff3","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-10-19T18:06:19Z","pushed_at":"2015-10-19T23:18:50Z","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":475580,"stargazers_count":10769,"watchers_count":10769,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2731,"mirror_url":null,"open_issues_count":2056,"forks":2731,"open_issues":2056,"watchers":10769,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/15730"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/15730"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/15730/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15730/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a83e9fe11605d0d03c4c4603ca640ae72085cab9"}}}}