{"action":"created","comment":{"url":"https://api.github.com/repos/docker/distribution/pulls/comments/26002569","id":26002569,"diff_hunk":"@@ -14,9 +14,11 @@ import (\n \t\"github.com/docker/docker/pkg/tarsum\"\n )\n \n-// layerUploadController is used to control the various aspects of resumable\n+var _ distribution.LayerUpload = &layerWriter{}","path":"registry/storage/layerwriter.go","position":5,"original_position":5,"commit_id":"426bfcf7c7fd17415f96d578c48be2e322b405be","original_commit_id":"426bfcf7c7fd17415f96d578c48be2e322b405be","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"body":"Having layerReader and layerUpload was inconsistent naming vs fileReader and fileWriter. Also, Go uses \"Reader\" and \"Writer\" consistently. Given the interfaces implemented, layerWriter seems like a much more appropriate and consistent name.","created_at":"2015-03-08T05:55:14Z","updated_at":"2015-03-08T05:55:14Z","html_url":"https://github.com/docker/distribution/pull/244#discussion_r26002569","pull_request_url":"https://api.github.com/repos/docker/distribution/pulls/244","_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments/26002569"},"html":{"href":"https://github.com/docker/distribution/pull/244#discussion_r26002569"},"pull_request":{"href":"https://api.github.com/repos/docker/distribution/pulls/244"}}},"pull_request":{"url":"https://api.github.com/repos/docker/distribution/pulls/244","id":30622175,"html_url":"https://github.com/docker/distribution/pull/244","diff_url":"https://github.com/docker/distribution/pull/244.diff","patch_url":"https://github.com/docker/distribution/pull/244.patch","issue_url":"https://api.github.com/repos/docker/distribution/issues/244","number":244,"state":"open","locked":false,"title":"registry/middleware, registry/storage, configuration: refactoring cloudfront + generic middlewares","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"body":"This turned into a larger project than just refactoring the cloudfront code to break the dependency from storage to goamz.\r\n\r\nUpdates include:\r\n* Generic concept of middleware for storage, registries, and repositories (to integrate with @ncdc's PR).\r\n* Pushed cloudfront code down into a driver/middleware package.\r\n* Cloudfront now implements the StorageDriver interface, storage.LayerHandler interface has been removed.\r\n* LayerReader now implements ServeHTTP (and the distribution.Layer interface requires it). This concept will hopefully be broadened to manifests and blobs in general.\r\n* \"storage.layerUploadController\" has been renamed to \"layerWriter\" for a more consistent naming scheme vs. layerReader (also consistent with filereader/filewriter). This is a safe change as layerUploadController was not exported from the storage package.\r\n* Dependency the storage package had on goamz is now removed\r\n* New configuration that generically handles middleware and injection points. @endophage to update in doc/configuration.md.\r\n\r\np.s. @stevvooe you were right, LayerReader wasn't exported before. I can't remember why I changed it but I'll see about switching it back.\r\n\r\nSigned-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)","created_at":"2015-03-06T05:37:51Z","updated_at":"2015-03-08T05:55:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51973976c58c44056b716317994180e5145a297d","assignee":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/docker/distribution/milestones/3","html_url":"https://github.com/docker/distribution/milestones/Registry/RC","labels_url":"https://api.github.com/repos/docker/distribution/milestones/3/labels","id":924559,"number":3,"title":"Registry/RC","description":"Issues that are part of the first release candidate.","creator":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":6,"state":"open","created_at":"2015-01-06T22:00:58Z","updated_at":"2015-03-06T05:38:18Z","due_on":"2015-03-19T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/distribution/pulls/244/commits","review_comments_url":"https://api.github.com/repos/docker/distribution/pulls/244/comments","review_comment_url":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/distribution/issues/244/comments","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/426bfcf7c7fd17415f96d578c48be2e322b405be","head":{"label":"endophage:cloudfront_refactor","ref":"cloudfront_refactor","sha":"426bfcf7c7fd17415f96d578c48be2e322b405be","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"repo":{"id":31222916,"name":"distribution","full_name":"endophage/distribution","owner":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/endophage/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":true,"url":"https://api.github.com/repos/endophage/distribution","forks_url":"https://api.github.com/repos/endophage/distribution/forks","keys_url":"https://api.github.com/repos/endophage/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endophage/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endophage/distribution/teams","hooks_url":"https://api.github.com/repos/endophage/distribution/hooks","issue_events_url":"https://api.github.com/repos/endophage/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/endophage/distribution/events","assignees_url":"https://api.github.com/repos/endophage/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/endophage/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/endophage/distribution/tags","blobs_url":"https://api.github.com/repos/endophage/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endophage/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endophage/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/endophage/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endophage/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/endophage/distribution/languages","stargazers_url":"https://api.github.com/repos/endophage/distribution/stargazers","contributors_url":"https://api.github.com/repos/endophage/distribution/contributors","subscribers_url":"https://api.github.com/repos/endophage/distribution/subscribers","subscription_url":"https://api.github.com/repos/endophage/distribution/subscription","commits_url":"https://api.github.com/repos/endophage/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/endophage/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/endophage/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/endophage/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/endophage/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/endophage/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endophage/distribution/merges","archive_url":"https://api.github.com/repos/endophage/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endophage/distribution/downloads","issues_url":"https://api.github.com/repos/endophage/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/endophage/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/endophage/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/endophage/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endophage/distribution/labels{/name}","releases_url":"https://api.github.com/repos/endophage/distribution/releases{/id}","created_at":"2015-02-23T18:37:33Z","updated_at":"2015-03-06T17:35:33Z","pushed_at":"2015-03-06T23:21:52Z","git_url":"git://github.com/endophage/distribution.git","ssh_url":"git@github.com:endophage/distribution.git","clone_url":"https://github.com/endophage/distribution.git","svn_url":"https://github.com/endophage/distribution","homepage":null,"size":1685,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"docker:master","ref":"master","sha":"81a03041d45179593ec5e3a8eb47289fa9b640db","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":28366058,"name":"distribution","full_name":"docker/distribution","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/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":false,"url":"https://api.github.com/repos/docker/distribution","forks_url":"https://api.github.com/repos/docker/distribution/forks","keys_url":"https://api.github.com/repos/docker/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/distribution/teams","hooks_url":"https://api.github.com/repos/docker/distribution/hooks","issue_events_url":"https://api.github.com/repos/docker/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/docker/distribution/events","assignees_url":"https://api.github.com/repos/docker/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/docker/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/docker/distribution/tags","blobs_url":"https://api.github.com/repos/docker/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/distribution/languages","stargazers_url":"https://api.github.com/repos/docker/distribution/stargazers","contributors_url":"https://api.github.com/repos/docker/distribution/contributors","subscribers_url":"https://api.github.com/repos/docker/distribution/subscribers","subscription_url":"https://api.github.com/repos/docker/distribution/subscription","commits_url":"https://api.github.com/repos/docker/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/docker/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/distribution/merges","archive_url":"https://api.github.com/repos/docker/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/distribution/downloads","issues_url":"https://api.github.com/repos/docker/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/docker/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/distribution/labels{/name}","releases_url":"https://api.github.com/repos/docker/distribution/releases{/id}","created_at":"2014-12-22T23:49:26Z","updated_at":"2015-03-08T04:10:24Z","pushed_at":"2015-03-07T02:53:56Z","git_url":"git://github.com/docker/distribution.git","ssh_url":"git@github.com:docker/distribution.git","clone_url":"https://github.com/docker/distribution.git","svn_url":"https://github.com/docker/distribution","homepage":null,"size":4017,"stargazers_count":137,"watchers_count":137,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":81,"forks":34,"open_issues":81,"watchers":137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/244"},"html":{"href":"https://github.com/docker/distribution/pull/244"},"issue":{"href":"https://api.github.com/repos/docker/distribution/issues/244"},"comments":{"href":"https://api.github.com/repos/docker/distribution/issues/244/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/distribution/pulls/244/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/distribution/pulls/244/commits"},"statuses":{"href":"https://api.github.com/repos/docker/distribution/statuses/426bfcf7c7fd17415f96d578c48be2e322b405be"}}}}