{"action":"created","comment":{"url":"https://api.github.com/repos/Xerpa/coelho/pulls/comments/200639215","pull_request_review_id":134995887,"id":200639215,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDYzOTIxNQ==","diff_hunk":"@@ -88,4 +156,44 @@ defmodule Coelho.Connection do\n   def open_channel() do\n     GenServer.call(__MODULE__, :open_channel)\n   end\n+\n+  def open_managed_channel() do\n+    GenServer.call(__MODULE__, :open_managed_channel)\n+  end\n+\n+  def get_managed_channel() do\n+    GenServer.call(__MODULE__, :get_managed_channel)\n+  end\n+\n+  defp new_state() do\n+    %{managed_channels: %{}, consumer_references: %{}, channel_references: %{}}\n+  end\n+\n+  defp open_managed_channel_impl(state, from, on_open_fn) do\n+    conn = state.conn\n+\n+    Logger.debug(\"Openning managed channel\")\n+\n+    {:ok, chan} = AMQP.Channel.open(conn)\n+\n+    chan_ref = Process.monitor(chan.pid)\n+\n+    consumer_ref = Process.monitor(from)","path":"lib/coelho/connection.ex","position":172,"original_position":172,"commit_id":"df26e4ff13087ae466890cc6074bb6431ec18d6f","original_commit_id":"df26e4ff13087ae466890cc6074bb6431ec18d6f","user":{"login":"thalesmg","id":16166434,"node_id":"MDQ6VXNlcjE2MTY2NDM0","avatar_url":"https://avatars2.githubusercontent.com/u/16166434?v=4","gravatar_id":"","url":"https://api.github.com/users/thalesmg","html_url":"https://github.com/thalesmg","followers_url":"https://api.github.com/users/thalesmg/followers","following_url":"https://api.github.com/users/thalesmg/following{/other_user}","gists_url":"https://api.github.com/users/thalesmg/gists{/gist_id}","starred_url":"https://api.github.com/users/thalesmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thalesmg/subscriptions","organizations_url":"https://api.github.com/users/thalesmg/orgs","repos_url":"https://api.github.com/users/thalesmg/repos","events_url":"https://api.github.com/users/thalesmg/events{/privacy}","received_events_url":"https://api.github.com/users/thalesmg/received_events","type":"User","site_admin":false},"body":":see_no_evil: \r\n","created_at":"2018-07-06T12:33:16Z","updated_at":"2018-07-06T12:33:16Z","html_url":"https://github.com/Xerpa/coelho/pull/3#discussion_r200639215","pull_request_url":"https://api.github.com/repos/Xerpa/coelho/pulls/3","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Xerpa/coelho/pulls/comments/200639215"},"html":{"href":"https://github.com/Xerpa/coelho/pull/3#discussion_r200639215"},"pull_request":{"href":"https://api.github.com/repos/Xerpa/coelho/pulls/3"}},"in_reply_to_id":200625814},"pull_request":{"url":"https://api.github.com/repos/Xerpa/coelho/pulls/3","id":199315174,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MzE1MTc0","html_url":"https://github.com/Xerpa/coelho/pull/3","diff_url":"https://github.com/Xerpa/coelho/pull/3.diff","patch_url":"https://github.com/Xerpa/coelho/pull/3.patch","issue_url":"https://api.github.com/repos/Xerpa/coelho/issues/3","number":3,"state":"open","locked":false,"title":"[WIP] Managed channels","user":{"login":"thalesmg","id":16166434,"node_id":"MDQ6VXNlcjE2MTY2NDM0","avatar_url":"https://avatars2.githubusercontent.com/u/16166434?v=4","gravatar_id":"","url":"https://api.github.com/users/thalesmg","html_url":"https://github.com/thalesmg","followers_url":"https://api.github.com/users/thalesmg/followers","following_url":"https://api.github.com/users/thalesmg/following{/other_user}","gists_url":"https://api.github.com/users/thalesmg/gists{/gist_id}","starred_url":"https://api.github.com/users/thalesmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thalesmg/subscriptions","organizations_url":"https://api.github.com/users/thalesmg/orgs","repos_url":"https://api.github.com/users/thalesmg/repos","events_url":"https://api.github.com/users/thalesmg/events{/privacy}","received_events_url":"https://api.github.com/users/thalesmg/received_events","type":"User","site_admin":false},"body":"Todo:\r\n\r\n- [ ] Tests","created_at":"2018-07-04T19:42:16Z","updated_at":"2018-07-06T12:33:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3404499cac6655e0069d3a3ae95326314fa9321e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Xerpa/coelho/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Xerpa/coelho/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Xerpa/coelho/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Xerpa/coelho/issues/3/comments","statuses_url":"https://api.github.com/repos/Xerpa/coelho/statuses/df26e4ff13087ae466890cc6074bb6431ec18d6f","head":{"label":"Xerpa:managed-channels","ref":"managed-channels","sha":"df26e4ff13087ae466890cc6074bb6431ec18d6f","user":{"login":"Xerpa","id":13859254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzODU5MjU0","avatar_url":"https://avatars0.githubusercontent.com/u/13859254?v=4","gravatar_id":"","url":"https://api.github.com/users/Xerpa","html_url":"https://github.com/Xerpa","followers_url":"https://api.github.com/users/Xerpa/followers","following_url":"https://api.github.com/users/Xerpa/following{/other_user}","gists_url":"https://api.github.com/users/Xerpa/gists{/gist_id}","starred_url":"https://api.github.com/users/Xerpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xerpa/subscriptions","organizations_url":"https://api.github.com/users/Xerpa/orgs","repos_url":"https://api.github.com/users/Xerpa/repos","events_url":"https://api.github.com/users/Xerpa/events{/privacy}","received_events_url":"https://api.github.com/users/Xerpa/received_events","type":"Organization","site_admin":false},"repo":{"id":137352259,"node_id":"MDEwOlJlcG9zaXRvcnkxMzczNTIyNTk=","name":"coelho","full_name":"Xerpa/coelho","owner":{"login":"Xerpa","id":13859254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzODU5MjU0","avatar_url":"https://avatars0.githubusercontent.com/u/13859254?v=4","gravatar_id":"","url":"https://api.github.com/users/Xerpa","html_url":"https://github.com/Xerpa","followers_url":"https://api.github.com/users/Xerpa/followers","following_url":"https://api.github.com/users/Xerpa/following{/other_user}","gists_url":"https://api.github.com/users/Xerpa/gists{/gist_id}","starred_url":"https://api.github.com/users/Xerpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xerpa/subscriptions","organizations_url":"https://api.github.com/users/Xerpa/orgs","repos_url":"https://api.github.com/users/Xerpa/repos","events_url":"https://api.github.com/users/Xerpa/events{/privacy}","received_events_url":"https://api.github.com/users/Xerpa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Xerpa/coelho","description":null,"fork":false,"url":"https://api.github.com/repos/Xerpa/coelho","forks_url":"https://api.github.com/repos/Xerpa/coelho/forks","keys_url":"https://api.github.com/repos/Xerpa/coelho/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Xerpa/coelho/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Xerpa/coelho/teams","hooks_url":"https://api.github.com/repos/Xerpa/coelho/hooks","issue_events_url":"https://api.github.com/repos/Xerpa/coelho/issues/events{/number}","events_url":"https://api.github.com/repos/Xerpa/coelho/events","assignees_url":"https://api.github.com/repos/Xerpa/coelho/assignees{/user}","branches_url":"https://api.github.com/repos/Xerpa/coelho/branches{/branch}","tags_url":"https://api.github.com/repos/Xerpa/coelho/tags","blobs_url":"https://api.github.com/repos/Xerpa/coelho/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Xerpa/coelho/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Xerpa/coelho/git/refs{/sha}","trees_url":"https://api.github.com/repos/Xerpa/coelho/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Xerpa/coelho/statuses/{sha}","languages_url":"https://api.github.com/repos/Xerpa/coelho/languages","stargazers_url":"https://api.github.com/repos/Xerpa/coelho/stargazers","contributors_url":"https://api.github.com/repos/Xerpa/coelho/contributors","subscribers_url":"https://api.github.com/repos/Xerpa/coelho/subscribers","subscription_url":"https://api.github.com/repos/Xerpa/coelho/subscription","commits_url":"https://api.github.com/repos/Xerpa/coelho/commits{/sha}","git_commits_url":"https://api.github.com/repos/Xerpa/coelho/git/commits{/sha}","comments_url":"https://api.github.com/repos/Xerpa/coelho/comments{/number}","issue_comment_url":"https://api.github.com/repos/Xerpa/coelho/issues/comments{/number}","contents_url":"https://api.github.com/repos/Xerpa/coelho/contents/{+path}","compare_url":"https://api.github.com/repos/Xerpa/coelho/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Xerpa/coelho/merges","archive_url":"https://api.github.com/repos/Xerpa/coelho/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Xerpa/coelho/downloads","issues_url":"https://api.github.com/repos/Xerpa/coelho/issues{/number}","pulls_url":"https://api.github.com/repos/Xerpa/coelho/pulls{/number}","milestones_url":"https://api.github.com/repos/Xerpa/coelho/milestones{/number}","notifications_url":"https://api.github.com/repos/Xerpa/coelho/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Xerpa/coelho/labels{/name}","releases_url":"https://api.github.com/repos/Xerpa/coelho/releases{/id}","deployments_url":"https://api.github.com/repos/Xerpa/coelho/deployments","created_at":"2018-06-14T11:58:10Z","updated_at":"2018-07-04T20:47:28Z","pushed_at":"2018-07-04T20:47:30Z","git_url":"git://github.com/Xerpa/coelho.git","ssh_url":"git@github.com:Xerpa/coelho.git","clone_url":"https://github.com/Xerpa/coelho.git","svn_url":"https://github.com/Xerpa/coelho","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Xerpa:master","ref":"master","sha":"1c57b6015082e2e3e13c90286eaab762b1904020","user":{"login":"Xerpa","id":13859254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzODU5MjU0","avatar_url":"https://avatars0.githubusercontent.com/u/13859254?v=4","gravatar_id":"","url":"https://api.github.com/users/Xerpa","html_url":"https://github.com/Xerpa","followers_url":"https://api.github.com/users/Xerpa/followers","following_url":"https://api.github.com/users/Xerpa/following{/other_user}","gists_url":"https://api.github.com/users/Xerpa/gists{/gist_id}","starred_url":"https://api.github.com/users/Xerpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xerpa/subscriptions","organizations_url":"https://api.github.com/users/Xerpa/orgs","repos_url":"https://api.github.com/users/Xerpa/repos","events_url":"https://api.github.com/users/Xerpa/events{/privacy}","received_events_url":"https://api.github.com/users/Xerpa/received_events","type":"Organization","site_admin":false},"repo":{"id":137352259,"node_id":"MDEwOlJlcG9zaXRvcnkxMzczNTIyNTk=","name":"coelho","full_name":"Xerpa/coelho","owner":{"login":"Xerpa","id":13859254,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzODU5MjU0","avatar_url":"https://avatars0.githubusercontent.com/u/13859254?v=4","gravatar_id":"","url":"https://api.github.com/users/Xerpa","html_url":"https://github.com/Xerpa","followers_url":"https://api.github.com/users/Xerpa/followers","following_url":"https://api.github.com/users/Xerpa/following{/other_user}","gists_url":"https://api.github.com/users/Xerpa/gists{/gist_id}","starred_url":"https://api.github.com/users/Xerpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xerpa/subscriptions","organizations_url":"https://api.github.com/users/Xerpa/orgs","repos_url":"https://api.github.com/users/Xerpa/repos","events_url":"https://api.github.com/users/Xerpa/events{/privacy}","received_events_url":"https://api.github.com/users/Xerpa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Xerpa/coelho","description":null,"fork":false,"url":"https://api.github.com/repos/Xerpa/coelho","forks_url":"https://api.github.com/repos/Xerpa/coelho/forks","keys_url":"https://api.github.com/repos/Xerpa/coelho/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Xerpa/coelho/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Xerpa/coelho/teams","hooks_url":"https://api.github.com/repos/Xerpa/coelho/hooks","issue_events_url":"https://api.github.com/repos/Xerpa/coelho/issues/events{/number}","events_url":"https://api.github.com/repos/Xerpa/coelho/events","assignees_url":"https://api.github.com/repos/Xerpa/coelho/assignees{/user}","branches_url":"https://api.github.com/repos/Xerpa/coelho/branches{/branch}","tags_url":"https://api.github.com/repos/Xerpa/coelho/tags","blobs_url":"https://api.github.com/repos/Xerpa/coelho/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Xerpa/coelho/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Xerpa/coelho/git/refs{/sha}","trees_url":"https://api.github.com/repos/Xerpa/coelho/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Xerpa/coelho/statuses/{sha}","languages_url":"https://api.github.com/repos/Xerpa/coelho/languages","stargazers_url":"https://api.github.com/repos/Xerpa/coelho/stargazers","contributors_url":"https://api.github.com/repos/Xerpa/coelho/contributors","subscribers_url":"https://api.github.com/repos/Xerpa/coelho/subscribers","subscription_url":"https://api.github.com/repos/Xerpa/coelho/subscription","commits_url":"https://api.github.com/repos/Xerpa/coelho/commits{/sha}","git_commits_url":"https://api.github.com/repos/Xerpa/coelho/git/commits{/sha}","comments_url":"https://api.github.com/repos/Xerpa/coelho/comments{/number}","issue_comment_url":"https://api.github.com/repos/Xerpa/coelho/issues/comments{/number}","contents_url":"https://api.github.com/repos/Xerpa/coelho/contents/{+path}","compare_url":"https://api.github.com/repos/Xerpa/coelho/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Xerpa/coelho/merges","archive_url":"https://api.github.com/repos/Xerpa/coelho/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Xerpa/coelho/downloads","issues_url":"https://api.github.com/repos/Xerpa/coelho/issues{/number}","pulls_url":"https://api.github.com/repos/Xerpa/coelho/pulls{/number}","milestones_url":"https://api.github.com/repos/Xerpa/coelho/milestones{/number}","notifications_url":"https://api.github.com/repos/Xerpa/coelho/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Xerpa/coelho/labels{/name}","releases_url":"https://api.github.com/repos/Xerpa/coelho/releases{/id}","deployments_url":"https://api.github.com/repos/Xerpa/coelho/deployments","created_at":"2018-06-14T11:58:10Z","updated_at":"2018-07-04T20:47:28Z","pushed_at":"2018-07-04T20:47:30Z","git_url":"git://github.com/Xerpa/coelho.git","ssh_url":"git@github.com:Xerpa/coelho.git","clone_url":"https://github.com/Xerpa/coelho.git","svn_url":"https://github.com/Xerpa/coelho","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Xerpa/coelho/pulls/3"},"html":{"href":"https://github.com/Xerpa/coelho/pull/3"},"issue":{"href":"https://api.github.com/repos/Xerpa/coelho/issues/3"},"comments":{"href":"https://api.github.com/repos/Xerpa/coelho/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Xerpa/coelho/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Xerpa/coelho/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Xerpa/coelho/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Xerpa/coelho/statuses/df26e4ff13087ae466890cc6074bb6431ec18d6f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"thalesmg"}}