GitHub PullRequestReviewCommentEvent at 2014-07-07 23:34:16
Repository: libcontainer
Actor: vmarmol
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/docker/libcontainer/pulls/comments/14629323","id":14629323,"diff_hunk":"@@ -1,23 +1,144 @@\n+/*\n+API for libcontainer.\n+\n+NOTE: The API is in flux and mainly not implemented. Proceed with caution until further notice.\n+*/\n package libcontainer\n \n import (\n-\t\"github.com/docker/libcontainer/cgroups/fs\"\n-\t\"github.com/docker/libcontainer/network\"\n+\t\"io\"\n+)\n+\n+// Factory of libcontainer containers.\n+type Factory interface {\n+\t// Creates a new container as specified, and starts an init process inside.\n+\t//\n+\t// The container and PID of the init process is returned. The init must be reaped by the caller.\n+\t//\n+\t// Errors: name already exists,\n+\t//         config invalid,\n+\t//         system.\n+\t//\n+\t// On error, any partially created container parts are cleaned up (the operation is atomic).\n+\tCreate(name Name, config *Config, initialProcess *ProcessConfig) (*Container, int, error)\n+}\n+\n+// A libcontainer container object. Must be created by the Factory above.\n+//\n+// Each container is thread-safe within the same process. Since a container can\n+// be destroyed by a separate process, any function may return that the container\n+// was not found.\n+type Container interface {\n+\t// Returns the name of this container.\n+\tName() Name\n+\n+\t// Returns the current run state of the container.\n+\t//\n+\t// Errors: container no longer exists,\n+\t//         system error.\n+\tRunState() (RunState, error)\n+\n+\t// Returns the current config of the container.\n+\t//\n+\t// Errors: container no longer exists,\n+\t//         system error.\n+\tConfig() (*Config, error)\n+\n+\t// Destroys the container after killing all running processes.\n+\t//\n+\t// Any event registrations are removed before the container is destroyed.\n+\t// No error is returned if the container is already destroyed.","path":"api.go","position":52,"original_position":52,"commit_id":"6378124ed73424e548ab2e17d423b595fda6bcba","original_commit_id":"6378124ed73424e548ab2e17d423b595fda6bcba","user":{"login":"vmarmol","id":985208,"avatar_url":"https://avatars.githubusercontent.com/u/985208?","gravatar_id":"db9e07d23f3bf996994276c0321c0b07","url":"https://api.github.com/users/vmarmol","html_url":"https://github.com/vmarmol","followers_url":"https://api.github.com/users/vmarmol/followers","following_url":"https://api.github.com/users/vmarmol/following{/other_user}","gists_url":"https://api.github.com/users/vmarmol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarmol/subscriptions","organizations_url":"https://api.github.com/users/vmarmol/orgs","repos_url":"https://api.github.com/users/vmarmol/repos","events_url":"https://api.github.com/users/vmarmol/events{/privacy}","received_events_url":"https://api.github.com/users/vmarmol/received_events","type":"User","site_admin":false},"body":"Since the API doesn't make any mention of subcontainers we aren't here. I think we'll throw some \"this cgroup still exists\" error in that case instead of recursively deleting. It'll be tricky to track down that cgroup though. We may need to see how to handle that later","created_at":"2014-07-07T23:34:16Z","updated_at":"2014-07-07T23:34:16Z","html_url":"https://github.com/docker/libcontainer/pull/67#discussion_r14629323","pull_request_url":"https://api.github.com/repos/docker/libcontainer/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/docker/libcontainer/pulls/comments/14629323"},"html":{"href":"https://github.com/docker/libcontainer/pull/67#discussion_r14629323"},"pull_request":{"href":"https://api.github.com/repos/docker/libcontainer/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/docker/libcontainer/pulls/67","id":18073778,"html_url":"https://github.com/docker/libcontainer/pull/67","diff_url":"https://github.com/docker/libcontainer/pull/67.diff","patch_url":"https://github.com/docker/libcontainer/pull/67.patch","issue_url":"https://api.github.com/repos/docker/libcontainer/issues/67","number":67,"state":"open","title":"Basic version of libcontainer API.","user":{"login":"vmarmol","id":985208,"avatar_url":"https://avatars.githubusercontent.com/u/985208?","gravatar_id":"db9e07d23f3bf996994276c0321c0b07","url":"https://api.github.com/users/vmarmol","html_url":"https://github.com/vmarmol","followers_url":"https://api.github.com/users/vmarmol/followers","following_url":"https://api.github.com/users/vmarmol/following{/other_user}","gists_url":"https://api.github.com/users/vmarmol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarmol/subscriptions","organizations_url":"https://api.github.com/users/vmarmol/orgs","repos_url":"https://api.github.com/users/vmarmol/repos","events_url":"https://api.github.com/users/vmarmol/events{/privacy}","received_events_url":"https://api.github.com/users/vmarmol/received_events","type":"User","site_admin":false},"body":"This version has mostly the behavior available today and the\r\nfunctionality agreed upon in other PRs. Further changes will be sent as\r\nsmaller PRs for discussion.\r\n\r\nThis PR is meant to be the already agreed-upon components of the API (note that a lot of functionality is missing). The reviewing is getting harder so we'll try to get this in, and then make the smaller changes with more discussion in smaller PRs.\r\n\r\nDocker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)","created_at":"2014-07-07T22:41:52Z","updated_at":"2014-07-07T23:34:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd543719e86696ff5640b7b4e692cb03195aff16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/libcontainer/pulls/67/commits","review_comments_url":"https://api.github.com/repos/docker/libcontainer/pulls/67/comments","review_comment_url":"https://api.github.com/repos/docker/libcontainer/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/libcontainer/issues/67/comments","statuses_url":"https://api.github.com/repos/docker/libcontainer/statuses/6378124ed73424e548ab2e17d423b595fda6bcba","head":{"label":"vmarmol:api2","ref":"api2","sha":"6378124ed73424e548ab2e17d423b595fda6bcba","user":{"login":"vmarmol","id":985208,"avatar_url":"https://avatars.githubusercontent.com/u/985208?","gravatar_id":"db9e07d23f3bf996994276c0321c0b07","url":"https://api.github.com/users/vmarmol","html_url":"https://github.com/vmarmol","followers_url":"https://api.github.com/users/vmarmol/followers","following_url":"https://api.github.com/users/vmarmol/following{/other_user}","gists_url":"https://api.github.com/users/vmarmol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarmol/subscriptions","organizations_url":"https://api.github.com/users/vmarmol/orgs","repos_url":"https://api.github.com/users/vmarmol/repos","events_url":"https://api.github.com/users/vmarmol/events{/privacy}","received_events_url":"https://api.github.com/users/vmarmol/received_events","type":"User","site_admin":false},"repo":{"id":20811051,"name":"libcontainer","full_name":"vmarmol/libcontainer","owner":{"login":"vmarmol","id":985208,"avatar_url":"https://avatars.githubusercontent.com/u/985208?","gravatar_id":"db9e07d23f3bf996994276c0321c0b07","url":"https://api.github.com/users/vmarmol","html_url":"https://github.com/vmarmol","followers_url":"https://api.github.com/users/vmarmol/followers","following_url":"https://api.github.com/users/vmarmol/following{/other_user}","gists_url":"https://api.github.com/users/vmarmol/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarmol/subscriptions","organizations_url":"https://api.github.com/users/vmarmol/orgs","repos_url":"https://api.github.com/users/vmarmol/repos","events_url":"https://api.github.com/users/vmarmol/events{/privacy}","received_events_url":"https://api.github.com/users/vmarmol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vmarmol/libcontainer","description":"Linux Containers","fork":true,"url":"https://api.github.com/repos/vmarmol/libcontainer","forks_url":"https://api.github.com/repos/vmarmol/libcontainer/forks","keys_url":"https://api.github.com/repos/vmarmol/libcontainer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmarmol/libcontainer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmarmol/libcontainer/teams","hooks_url":"https://api.github.com/repos/vmarmol/libcontainer/hooks","issue_events_url":"https://api.github.com/repos/vmarmol/libcontainer/issues/events{/number}","events_url":"https://api.github.com/repos/vmarmol/libcontainer/events","assignees_url":"https://api.github.com/repos/vmarmol/libcontainer/assignees{/user}","branches_url":"https://api.github.com/repos/vmarmol/libcontainer/branches{/branch}","tags_url":"https://api.github.com/repos/vmarmol/libcontainer/tags","blobs_url":"https://api.github.com/repos/vmarmol/libcontainer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmarmol/libcontainer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmarmol/libcontainer/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmarmol/libcontainer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmarmol/libcontainer/statuses/{sha}","languages_url":"https://api.github.com/repos/vmarmol/libcontainer/languages","stargazers_url":"https://api.github.com/repos/vmarmol/libcontainer/stargazers","contributors_url":"https://api.github.com/repos/vmarmol/libcontainer/contributors","subscribers_url":"https://api.github.com/repos/vmarmol/libcontainer/subscribers","subscription_url":"https://api.github.com/repos/vmarmol/libcontainer/subscription","commits_url":"https://api.github.com/repos/vmarmol/libcontainer/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmarmol/libcontainer/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmarmol/libcontainer/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmarmol/libcontainer/issues/comments/{number}","contents_url":"https://api.github.com/repos/vmarmol/libcontainer/contents/{+path}","compare_url":"https://api.github.com/repos/vmarmol/libcontainer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmarmol/libcontainer/merges","archive_url":"https://api.github.com/repos/vmarmol/libcontainer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmarmol/libcontainer/downloads","issues_url":"https://api.github.com/repos/vmarmol/libcontainer/issues{/number}","pulls_url":"https://api.github.com/repos/vmarmol/libcontainer/pulls{/number}","milestones_url":"https://api.github.com/repos/vmarmol/libcontainer/milestones{/number}","notifications_url":"https://api.github.com/repos/vmarmol/libcontainer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmarmol/libcontainer/labels{/name}","releases_url":"https://api.github.com/repos/vmarmol/libcontainer/releases{/id}","created_at":"2014-06-13T16:49:27Z","updated_at":"2014-06-24T17:56:42Z","pushed_at":"2014-07-07T22:40:29Z","git_url":"git://github.com/vmarmol/libcontainer.git","ssh_url":"git@github.com:vmarmol/libcontainer.git","clone_url":"https://github.com/vmarmol/libcontainer.git","svn_url":"https://github.com/vmarmol/libcontainer","homepage":"http://www.docker.com/","size":746,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"99458b9c57703db0f7b7980ba7281668b8195048","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?","gravatar_id":null,"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":15693680,"name":"libcontainer","full_name":"docker/libcontainer","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?","gravatar_id":null,"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/libcontainer","description":"Linux Containers","fork":false,"url":"https://api.github.com/repos/docker/libcontainer","forks_url":"https://api.github.com/repos/docker/libcontainer/forks","keys_url":"https://api.github.com/repos/docker/libcontainer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/libcontainer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/libcontainer/teams","hooks_url":"https://api.github.com/repos/docker/libcontainer/hooks","issue_events_url":"https://api.github.com/repos/docker/libcontainer/issues/events{/number}","events_url":"https://api.github.com/repos/docker/libcontainer/events","assignees_url":"https://api.github.com/repos/docker/libcontainer/assignees{/user}","branches_url":"https://api.github.com/repos/docker/libcontainer/branches{/branch}","tags_url":"https://api.github.com/repos/docker/libcontainer/tags","blobs_url":"https://api.github.com/repos/docker/libcontainer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/libcontainer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/libcontainer/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/libcontainer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/libcontainer/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/libcontainer/languages","stargazers_url":"https://api.github.com/repos/docker/libcontainer/stargazers","contributors_url":"https://api.github.com/repos/docker/libcontainer/contributors","subscribers_url":"https://api.github.com/repos/docker/libcontainer/subscribers","subscription_url":"https://api.github.com/repos/docker/libcontainer/subscription","commits_url":"https://api.github.com/repos/docker/libcontainer/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/libcontainer/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/libcontainer/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/libcontainer/issues/comments/{number}","contents_url":"https://api.github.com/repos/docker/libcontainer/contents/{+path}","compare_url":"https://api.github.com/repos/docker/libcontainer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/libcontainer/merges","archive_url":"https://api.github.com/repos/docker/libcontainer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/libcontainer/downloads","issues_url":"https://api.github.com/repos/docker/libcontainer/issues{/number}","pulls_url":"https://api.github.com/repos/docker/libcontainer/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/libcontainer/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/libcontainer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/libcontainer/labels{/name}","releases_url":"https://api.github.com/repos/docker/libcontainer/releases{/id}","created_at":"2014-01-07T03:05:05Z","updated_at":"2014-07-07T17:17:42Z","pushed_at":"2014-07-07T17:50:33Z","git_url":"git://github.com/docker/libcontainer.git","ssh_url":"git@github.com:docker/libcontainer.git","clone_url":"https://github.com/docker/libcontainer.git","svn_url":"https://github.com/docker/libcontainer","homepage":"http://www.docker.com/","size":1774,"stargazers_count":341,"watchers_count":341,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":47,"mirror_url":null,"open_issues_count":23,"forks":47,"open_issues":23,"watchers":341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libcontainer/pulls/67"},"html":{"href":"https://github.com/docker/libcontainer/pull/67"},"issue":{"href":"https://api.github.com/repos/docker/libcontainer/issues/67"},"comments":{"href":"https://api.github.com/repos/docker/libcontainer/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libcontainer/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libcontainer/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/libcontainer/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libcontainer/statuses/6378124ed73424e548ab2e17d423b595fda6bcba"}}}}