{"action":"created","comment":{"url":"https://api.github.com/repos/deliveryhero/lymph/pulls/comments/27036393","id":27036393,"diff_hunk":"@@ -0,0 +1,49 @@\n+.. currentmodule:: lymph.core.components\n+\n+\n+Components API\n+==============\n+\n+Components are objects that depend on a running service container. They are \n+embedded in :class:`Componentized` objects. \n+Since Componentized objects themselves are components, they form a tree of \n+:class:`Component` instances with the container as the root.\n+\n+\n+.. class:: Component\n+\n+    .. attribute:: metrics\n+    \n+        A :class:`Metrics` instance that will be included in the monitoring data\n+        of the conatainer.\n+\n+    .. method:: on_start()\n+    \n+        Called when the container is started.\n+\n+    .. method:: on_stop()\n+    \n+        Called when the container is stopped.\n+\n+\n+.. class:: Componentized()\n+\n+    A collection of components; itself a component.\n+\n+    .. method:: add_component(component)\n+    \n+        :param component: :class:`Component`\n+    \n+        Adds `component`.\n+    \n+    .. attribute:: metrics\n+    \n+        A :class:`Metrics` instance that aggregates the metrics from all added components.\n+    \n+    .. method:: on_start()\n+    \n+        Calls `on_start()` on all added components.","path":"docs/api/components_api.rst","position":45,"original_position":45,"commit_id":"d945407e02904b19efdecc003618ba0c0d0c83b5","original_commit_id":"d945407e02904b19efdecc003618ba0c0d0c83b5","user":{"login":"mamachanko","id":1182927,"avatar_url":"https://avatars.githubusercontent.com/u/1182927?v=3","gravatar_id":"","url":"https://api.github.com/users/mamachanko","html_url":"https://github.com/mamachanko","followers_url":"https://api.github.com/users/mamachanko/followers","following_url":"https://api.github.com/users/mamachanko/following{/other_user}","gists_url":"https://api.github.com/users/mamachanko/gists{/gist_id}","starred_url":"https://api.github.com/users/mamachanko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamachanko/subscriptions","organizations_url":"https://api.github.com/users/mamachanko/orgs","repos_url":"https://api.github.com/users/mamachanko/repos","events_url":"https://api.github.com/users/mamachanko/events{/privacy}","received_events_url":"https://api.github.com/users/mamachanko/received_events","type":"User","site_admin":false},"body":"Shouldn't it be instead?\r\n\r\n_\"Should call `on_start()` on all added components.\"_","created_at":"2015-03-24T15:06:02Z","updated_at":"2015-03-24T15:06:02Z","html_url":"https://github.com/deliveryhero/lymph/pull/140#discussion_r27036393","pull_request_url":"https://api.github.com/repos/deliveryhero/lymph/pulls/140","_links":{"self":{"href":"https://api.github.com/repos/deliveryhero/lymph/pulls/comments/27036393"},"html":{"href":"https://github.com/deliveryhero/lymph/pull/140#discussion_r27036393"},"pull_request":{"href":"https://api.github.com/repos/deliveryhero/lymph/pulls/140"}}},"pull_request":{"url":"https://api.github.com/repos/deliveryhero/lymph/pulls/140","id":31733982,"html_url":"https://github.com/deliveryhero/lymph/pull/140","diff_url":"https://github.com/deliveryhero/lymph/pull/140.diff","patch_url":"https://github.com/deliveryhero/lymph/pull/140.patch","issue_url":"https://api.github.com/repos/deliveryhero/lymph/issues/140","number":140,"state":"open","locked":false,"title":"Component refactoring","user":{"login":"emulbreh","id":120118,"avatar_url":"https://avatars.githubusercontent.com/u/120118?v=3","gravatar_id":"","url":"https://api.github.com/users/emulbreh","html_url":"https://github.com/emulbreh","followers_url":"https://api.github.com/users/emulbreh/followers","following_url":"https://api.github.com/users/emulbreh/following{/other_user}","gists_url":"https://api.github.com/users/emulbreh/gists{/gist_id}","starred_url":"https://api.github.com/users/emulbreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emulbreh/subscriptions","organizations_url":"https://api.github.com/users/emulbreh/orgs","repos_url":"https://api.github.com/users/emulbreh/repos","events_url":"https://api.github.com/users/emulbreh/events{/privacy}","received_events_url":"https://api.github.com/users/emulbreh/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-23T14:00:23Z","updated_at":"2015-03-24T15:06:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5e2af872145516331d4c93d0145f6759e9d5b29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/deliveryhero/lymph/pulls/140/commits","review_comments_url":"https://api.github.com/repos/deliveryhero/lymph/pulls/140/comments","review_comment_url":"https://api.github.com/repos/deliveryhero/lymph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deliveryhero/lymph/issues/140/comments","statuses_url":"https://api.github.com/repos/deliveryhero/lymph/statuses/d945407e02904b19efdecc003618ba0c0d0c83b5","head":{"label":"emulbreh:dumb-monitoring","ref":"dumb-monitoring","sha":"d945407e02904b19efdecc003618ba0c0d0c83b5","user":{"login":"emulbreh","id":120118,"avatar_url":"https://avatars.githubusercontent.com/u/120118?v=3","gravatar_id":"","url":"https://api.github.com/users/emulbreh","html_url":"https://github.com/emulbreh","followers_url":"https://api.github.com/users/emulbreh/followers","following_url":"https://api.github.com/users/emulbreh/following{/other_user}","gists_url":"https://api.github.com/users/emulbreh/gists{/gist_id}","starred_url":"https://api.github.com/users/emulbreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emulbreh/subscriptions","organizations_url":"https://api.github.com/users/emulbreh/orgs","repos_url":"https://api.github.com/users/emulbreh/repos","events_url":"https://api.github.com/users/emulbreh/events{/privacy}","received_events_url":"https://api.github.com/users/emulbreh/received_events","type":"User","site_admin":false},"repo":{"id":20256280,"name":"lymph","full_name":"emulbreh/lymph","owner":{"login":"emulbreh","id":120118,"avatar_url":"https://avatars.githubusercontent.com/u/120118?v=3","gravatar_id":"","url":"https://api.github.com/users/emulbreh","html_url":"https://github.com/emulbreh","followers_url":"https://api.github.com/users/emulbreh/followers","following_url":"https://api.github.com/users/emulbreh/following{/other_user}","gists_url":"https://api.github.com/users/emulbreh/gists{/gist_id}","starred_url":"https://api.github.com/users/emulbreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emulbreh/subscriptions","organizations_url":"https://api.github.com/users/emulbreh/orgs","repos_url":"https://api.github.com/users/emulbreh/repos","events_url":"https://api.github.com/users/emulbreh/events{/privacy}","received_events_url":"https://api.github.com/users/emulbreh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emulbreh/lymph","description":"framework for python services","fork":true,"url":"https://api.github.com/repos/emulbreh/lymph","forks_url":"https://api.github.com/repos/emulbreh/lymph/forks","keys_url":"https://api.github.com/repos/emulbreh/lymph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emulbreh/lymph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emulbreh/lymph/teams","hooks_url":"https://api.github.com/repos/emulbreh/lymph/hooks","issue_events_url":"https://api.github.com/repos/emulbreh/lymph/issues/events{/number}","events_url":"https://api.github.com/repos/emulbreh/lymph/events","assignees_url":"https://api.github.com/repos/emulbreh/lymph/assignees{/user}","branches_url":"https://api.github.com/repos/emulbreh/lymph/branches{/branch}","tags_url":"https://api.github.com/repos/emulbreh/lymph/tags","blobs_url":"https://api.github.com/repos/emulbreh/lymph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emulbreh/lymph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emulbreh/lymph/git/refs{/sha}","trees_url":"https://api.github.com/repos/emulbreh/lymph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emulbreh/lymph/statuses/{sha}","languages_url":"https://api.github.com/repos/emulbreh/lymph/languages","stargazers_url":"https://api.github.com/repos/emulbreh/lymph/stargazers","contributors_url":"https://api.github.com/repos/emulbreh/lymph/contributors","subscribers_url":"https://api.github.com/repos/emulbreh/lymph/subscribers","subscription_url":"https://api.github.com/repos/emulbreh/lymph/subscription","commits_url":"https://api.github.com/repos/emulbreh/lymph/commits{/sha}","git_commits_url":"https://api.github.com/repos/emulbreh/lymph/git/commits{/sha}","comments_url":"https://api.github.com/repos/emulbreh/lymph/comments{/number}","issue_comment_url":"https://api.github.com/repos/emulbreh/lymph/issues/comments{/number}","contents_url":"https://api.github.com/repos/emulbreh/lymph/contents/{+path}","compare_url":"https://api.github.com/repos/emulbreh/lymph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emulbreh/lymph/merges","archive_url":"https://api.github.com/repos/emulbreh/lymph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emulbreh/lymph/downloads","issues_url":"https://api.github.com/repos/emulbreh/lymph/issues{/number}","pulls_url":"https://api.github.com/repos/emulbreh/lymph/pulls{/number}","milestones_url":"https://api.github.com/repos/emulbreh/lymph/milestones{/number}","notifications_url":"https://api.github.com/repos/emulbreh/lymph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emulbreh/lymph/labels{/name}","releases_url":"https://api.github.com/repos/emulbreh/lymph/releases{/id}","created_at":"2014-05-28T12:16:28Z","updated_at":"2014-12-18T15:25:58Z","pushed_at":"2015-03-24T15:00:44Z","git_url":"git://github.com/emulbreh/lymph.git","ssh_url":"git@github.com:emulbreh/lymph.git","clone_url":"https://github.com/emulbreh/lymph.git","svn_url":"https://github.com/emulbreh/lymph","homepage":"","size":1131,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"deliveryhero:master","ref":"master","sha":"fb3a0b0eb85b2a91f54a24591381ddb2ebd04dc6","user":{"login":"deliveryhero","id":7225556,"avatar_url":"https://avatars.githubusercontent.com/u/7225556?v=3","gravatar_id":"","url":"https://api.github.com/users/deliveryhero","html_url":"https://github.com/deliveryhero","followers_url":"https://api.github.com/users/deliveryhero/followers","following_url":"https://api.github.com/users/deliveryhero/following{/other_user}","gists_url":"https://api.github.com/users/deliveryhero/gists{/gist_id}","starred_url":"https://api.github.com/users/deliveryhero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deliveryhero/subscriptions","organizations_url":"https://api.github.com/users/deliveryhero/orgs","repos_url":"https://api.github.com/users/deliveryhero/repos","events_url":"https://api.github.com/users/deliveryhero/events{/privacy}","received_events_url":"https://api.github.com/users/deliveryhero/received_events","type":"Organization","site_admin":false},"repo":{"id":20250192,"name":"lymph","full_name":"deliveryhero/lymph","owner":{"login":"deliveryhero","id":7225556,"avatar_url":"https://avatars.githubusercontent.com/u/7225556?v=3","gravatar_id":"","url":"https://api.github.com/users/deliveryhero","html_url":"https://github.com/deliveryhero","followers_url":"https://api.github.com/users/deliveryhero/followers","following_url":"https://api.github.com/users/deliveryhero/following{/other_user}","gists_url":"https://api.github.com/users/deliveryhero/gists{/gist_id}","starred_url":"https://api.github.com/users/deliveryhero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deliveryhero/subscriptions","organizations_url":"https://api.github.com/users/deliveryhero/orgs","repos_url":"https://api.github.com/users/deliveryhero/repos","events_url":"https://api.github.com/users/deliveryhero/events{/privacy}","received_events_url":"https://api.github.com/users/deliveryhero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deliveryhero/lymph","description":"framework for python services","fork":false,"url":"https://api.github.com/repos/deliveryhero/lymph","forks_url":"https://api.github.com/repos/deliveryhero/lymph/forks","keys_url":"https://api.github.com/repos/deliveryhero/lymph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deliveryhero/lymph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deliveryhero/lymph/teams","hooks_url":"https://api.github.com/repos/deliveryhero/lymph/hooks","issue_events_url":"https://api.github.com/repos/deliveryhero/lymph/issues/events{/number}","events_url":"https://api.github.com/repos/deliveryhero/lymph/events","assignees_url":"https://api.github.com/repos/deliveryhero/lymph/assignees{/user}","branches_url":"https://api.github.com/repos/deliveryhero/lymph/branches{/branch}","tags_url":"https://api.github.com/repos/deliveryhero/lymph/tags","blobs_url":"https://api.github.com/repos/deliveryhero/lymph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deliveryhero/lymph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deliveryhero/lymph/git/refs{/sha}","trees_url":"https://api.github.com/repos/deliveryhero/lymph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deliveryhero/lymph/statuses/{sha}","languages_url":"https://api.github.com/repos/deliveryhero/lymph/languages","stargazers_url":"https://api.github.com/repos/deliveryhero/lymph/stargazers","contributors_url":"https://api.github.com/repos/deliveryhero/lymph/contributors","subscribers_url":"https://api.github.com/repos/deliveryhero/lymph/subscribers","subscription_url":"https://api.github.com/repos/deliveryhero/lymph/subscription","commits_url":"https://api.github.com/repos/deliveryhero/lymph/commits{/sha}","git_commits_url":"https://api.github.com/repos/deliveryhero/lymph/git/commits{/sha}","comments_url":"https://api.github.com/repos/deliveryhero/lymph/comments{/number}","issue_comment_url":"https://api.github.com/repos/deliveryhero/lymph/issues/comments{/number}","contents_url":"https://api.github.com/repos/deliveryhero/lymph/contents/{+path}","compare_url":"https://api.github.com/repos/deliveryhero/lymph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deliveryhero/lymph/merges","archive_url":"https://api.github.com/repos/deliveryhero/lymph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deliveryhero/lymph/downloads","issues_url":"https://api.github.com/repos/deliveryhero/lymph/issues{/number}","pulls_url":"https://api.github.com/repos/deliveryhero/lymph/pulls{/number}","milestones_url":"https://api.github.com/repos/deliveryhero/lymph/milestones{/number}","notifications_url":"https://api.github.com/repos/deliveryhero/lymph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deliveryhero/lymph/labels{/name}","releases_url":"https://api.github.com/repos/deliveryhero/lymph/releases{/id}","created_at":"2014-05-28T08:24:51Z","updated_at":"2015-03-24T14:54:51Z","pushed_at":"2015-03-24T15:00:44Z","git_url":"git://github.com/deliveryhero/lymph.git","ssh_url":"git@github.com:deliveryhero/lymph.git","clone_url":"https://github.com/deliveryhero/lymph.git","svn_url":"https://github.com/deliveryhero/lymph","homepage":"","size":2506,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":8,"forks":20,"open_issues":8,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deliveryhero/lymph/pulls/140"},"html":{"href":"https://github.com/deliveryhero/lymph/pull/140"},"issue":{"href":"https://api.github.com/repos/deliveryhero/lymph/issues/140"},"comments":{"href":"https://api.github.com/repos/deliveryhero/lymph/issues/140/comments"},"review_comments":{"href":"https://api.github.com/repos/deliveryhero/lymph/pulls/140/comments"},"review_comment":{"href":"https://api.github.com/repos/deliveryhero/lymph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deliveryhero/lymph/pulls/140/commits"},"statuses":{"href":"https://api.github.com/repos/deliveryhero/lymph/statuses/d945407e02904b19efdecc003618ba0c0d0c83b5"}}}}