{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/middleware-server/pulls/comments/29278804","id":29278804,"diff_hunk":"@@ -0,0 +1,52 @@\n+package server\n+\n+import (\n+\t\"github.com/juju/errgo\"\n+)\n+\n+const (\n+\tStatusHealthy   = \"healthy\"\n+\tStatusUnhealthy = \"unhealthy\"\n+)\n+\n+type HealthInfo struct {\n+\tStatus   string       `json:\"status\"`\n+\tApp      string       `json:\"app\"`\n+\tVersion  string       `json:\"version\"`\n+\tBackends []HealthInfo `json:\"backends\"`\n+}\n+\n+type Healthchecker func() (HealthInfo, error)\n+\n+// Status just accumulates the backends stati to calculate the main status.","path":"healtcheck.go","position":null,"original_position":21,"commit_id":"8d05ad57ccfd827d5c33ead1d162dce678d41449","original_commit_id":"acfd829d5b72cfaf63313d25bd1587d99f22c509","user":{"login":"zyndiecate","id":552769,"avatar_url":"https://avatars.githubusercontent.com/u/552769?v=3","gravatar_id":"","url":"https://api.github.com/users/zyndiecate","html_url":"https://github.com/zyndiecate","followers_url":"https://api.github.com/users/zyndiecate/followers","following_url":"https://api.github.com/users/zyndiecate/following{/other_user}","gists_url":"https://api.github.com/users/zyndiecate/gists{/gist_id}","starred_url":"https://api.github.com/users/zyndiecate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyndiecate/subscriptions","organizations_url":"https://api.github.com/users/zyndiecate/orgs","repos_url":"https://api.github.com/users/zyndiecate/repos","events_url":"https://api.github.com/users/zyndiecate/events{/privacy}","received_events_url":"https://api.github.com/users/zyndiecate/received_events","type":"User","site_admin":false},"body":"Thx. Done.","created_at":"2015-04-28T19:23:18Z","updated_at":"2015-04-28T19:23:18Z","html_url":"https://github.com/giantswarm/middleware-server/pull/33#discussion_r29278804","pull_request_url":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/middleware-server/pulls/comments/29278804"},"html":{"href":"https://github.com/giantswarm/middleware-server/pull/33#discussion_r29278804"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33","id":27141271,"html_url":"https://github.com/giantswarm/middleware-server/pull/33","diff_url":"https://github.com/giantswarm/middleware-server/pull/33.diff","patch_url":"https://github.com/giantswarm/middleware-server/pull/33.patch","issue_url":"https://api.github.com/repos/giantswarm/middleware-server/issues/33","number":33,"state":"open","locked":false,"title":"Healthchecks","user":{"login":"zyndiecate","id":552769,"avatar_url":"https://avatars.githubusercontent.com/u/552769?v=3","gravatar_id":"","url":"https://api.github.com/users/zyndiecate","html_url":"https://github.com/zyndiecate","followers_url":"https://api.github.com/users/zyndiecate/followers","following_url":"https://api.github.com/users/zyndiecate/following{/other_user}","gists_url":"https://api.github.com/users/zyndiecate/gists{/gist_id}","starred_url":"https://api.github.com/users/zyndiecate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyndiecate/subscriptions","organizations_url":"https://api.github.com/users/zyndiecate/orgs","repos_url":"https://api.github.com/users/zyndiecate/repos","events_url":"https://api.github.com/users/zyndiecate/events{/privacy}","received_events_url":"https://api.github.com/users/zyndiecate/received_events","type":"User","site_admin":false},"body":"This is an proposal for a simple healthcheck mechanism. With this service will be able to define an `Healthchecker` that is responsible for preparing `HealthInfo`. The builtin `HealthcheckMiddleware` will be given the `Healthchecker` and responds with the given information when called. The `Healthchecker` is able to calculate a simple status, that is, when all stati are `healthy`, the service responds with `healthy`, otherwise `unhealthy`.\r\n\r\n<!---\r\n@huboard:{\"order\":200.0,\"milestone_order\":33,\"custom_state\":\"\"}\n-->\r\n","created_at":"2015-01-10T01:10:31Z","updated_at":"2015-04-28T19:23:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83a27777180fdacf73eec5d3f03baf05a78e6e91","assignee":{"login":"zyndiecate","id":552769,"avatar_url":"https://avatars.githubusercontent.com/u/552769?v=3","gravatar_id":"","url":"https://api.github.com/users/zyndiecate","html_url":"https://github.com/zyndiecate","followers_url":"https://api.github.com/users/zyndiecate/followers","following_url":"https://api.github.com/users/zyndiecate/following{/other_user}","gists_url":"https://api.github.com/users/zyndiecate/gists{/gist_id}","starred_url":"https://api.github.com/users/zyndiecate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyndiecate/subscriptions","organizations_url":"https://api.github.com/users/zyndiecate/orgs","repos_url":"https://api.github.com/users/zyndiecate/repos","events_url":"https://api.github.com/users/zyndiecate/events{/privacy}","received_events_url":"https://api.github.com/users/zyndiecate/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33/commits","review_comments_url":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33/comments","review_comment_url":"https://api.github.com/repos/giantswarm/middleware-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/middleware-server/issues/33/comments","statuses_url":"https://api.github.com/repos/giantswarm/middleware-server/statuses/8d05ad57ccfd827d5c33ead1d162dce678d41449","head":{"label":"giantswarm:healthchecks","ref":"healthchecks","sha":"8d05ad57ccfd827d5c33ead1d162dce678d41449","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":17049277,"name":"middleware-server","full_name":"giantswarm/middleware-server","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/middleware-server","description":"Lightweight server module handling http middlewares","fork":false,"url":"https://api.github.com/repos/giantswarm/middleware-server","forks_url":"https://api.github.com/repos/giantswarm/middleware-server/forks","keys_url":"https://api.github.com/repos/giantswarm/middleware-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/middleware-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/middleware-server/teams","hooks_url":"https://api.github.com/repos/giantswarm/middleware-server/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/middleware-server/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/middleware-server/events","assignees_url":"https://api.github.com/repos/giantswarm/middleware-server/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/middleware-server/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/middleware-server/tags","blobs_url":"https://api.github.com/repos/giantswarm/middleware-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/middleware-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/middleware-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/middleware-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/middleware-server/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/middleware-server/languages","stargazers_url":"https://api.github.com/repos/giantswarm/middleware-server/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/middleware-server/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/middleware-server/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/middleware-server/subscription","commits_url":"https://api.github.com/repos/giantswarm/middleware-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/middleware-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/middleware-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/middleware-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/middleware-server/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/middleware-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/middleware-server/merges","archive_url":"https://api.github.com/repos/giantswarm/middleware-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/middleware-server/downloads","issues_url":"https://api.github.com/repos/giantswarm/middleware-server/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/middleware-server/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/middleware-server/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/middleware-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/middleware-server/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/middleware-server/releases{/id}","created_at":"2014-02-21T07:53:01Z","updated_at":"2015-04-22T07:59:43Z","pushed_at":"2015-04-28T19:23:15Z","git_url":"git://github.com/giantswarm/middleware-server.git","ssh_url":"git@github.com:giantswarm/middleware-server.git","clone_url":"https://github.com/giantswarm/middleware-server.git","svn_url":"https://github.com/giantswarm/middleware-server","homepage":null,"size":3714,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":10,"forks":1,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"e16b5db61d3ec9c9995092cb609e9089804aeb36","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":17049277,"name":"middleware-server","full_name":"giantswarm/middleware-server","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/middleware-server","description":"Lightweight server module handling http middlewares","fork":false,"url":"https://api.github.com/repos/giantswarm/middleware-server","forks_url":"https://api.github.com/repos/giantswarm/middleware-server/forks","keys_url":"https://api.github.com/repos/giantswarm/middleware-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/middleware-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/middleware-server/teams","hooks_url":"https://api.github.com/repos/giantswarm/middleware-server/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/middleware-server/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/middleware-server/events","assignees_url":"https://api.github.com/repos/giantswarm/middleware-server/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/middleware-server/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/middleware-server/tags","blobs_url":"https://api.github.com/repos/giantswarm/middleware-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/middleware-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/middleware-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/middleware-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/middleware-server/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/middleware-server/languages","stargazers_url":"https://api.github.com/repos/giantswarm/middleware-server/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/middleware-server/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/middleware-server/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/middleware-server/subscription","commits_url":"https://api.github.com/repos/giantswarm/middleware-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/middleware-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/middleware-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/middleware-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/middleware-server/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/middleware-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/middleware-server/merges","archive_url":"https://api.github.com/repos/giantswarm/middleware-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/middleware-server/downloads","issues_url":"https://api.github.com/repos/giantswarm/middleware-server/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/middleware-server/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/middleware-server/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/middleware-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/middleware-server/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/middleware-server/releases{/id}","created_at":"2014-02-21T07:53:01Z","updated_at":"2015-04-22T07:59:43Z","pushed_at":"2015-04-28T19:23:15Z","git_url":"git://github.com/giantswarm/middleware-server.git","ssh_url":"git@github.com:giantswarm/middleware-server.git","clone_url":"https://github.com/giantswarm/middleware-server.git","svn_url":"https://github.com/giantswarm/middleware-server","homepage":null,"size":3714,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":10,"forks":1,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33"},"html":{"href":"https://github.com/giantswarm/middleware-server/pull/33"},"issue":{"href":"https://api.github.com/repos/giantswarm/middleware-server/issues/33"},"comments":{"href":"https://api.github.com/repos/giantswarm/middleware-server/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/middleware-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/middleware-server/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/middleware-server/statuses/8d05ad57ccfd827d5c33ead1d162dce678d41449"}}}}