{"action":"opened","number":17,"pull_request":{"url":"https://api.github.com/repos/iamaleksey/seestar/pulls/17","id":28523968,"html_url":"https://github.com/iamaleksey/seestar/pull/17","diff_url":"https://github.com/iamaleksey/seestar/pull/17.diff","patch_url":"https://github.com/iamaleksey/seestar/pull/17.patch","issue_url":"https://api.github.com/repos/iamaleksey/seestar/issues/17","number":17,"state":"open","locked":false,"title":"Forward Cassandra events to a listener pid","user":{"login":"srmerritt","id":337621,"avatar_url":"https://avatars.githubusercontent.com/u/337621?v=3","gravatar_id":"","url":"https://api.github.com/users/srmerritt","html_url":"https://github.com/srmerritt","followers_url":"https://api.github.com/users/srmerritt/followers","following_url":"https://api.github.com/users/srmerritt/following{/other_user}","gists_url":"https://api.github.com/users/srmerritt/gists{/gist_id}","starred_url":"https://api.github.com/users/srmerritt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srmerritt/subscriptions","organizations_url":"https://api.github.com/users/srmerritt/orgs","repos_url":"https://api.github.com/users/srmerritt/repos","events_url":"https://api.github.com/users/srmerritt/events{/privacy}","received_events_url":"https://api.github.com/users/srmerritt/received_events","type":"User","site_admin":false},"body":"Seestar already supports subscribing to server events, and the function exists to handle them as they arrive.\r\n\r\nThis patch implements decoding topology and status change events; the schema change event decoder exists.\r\n\r\nseestar_session now tracks an event listener pid in its state. Incoming events are forwarded to this pid, if it is defined. This follows the style of reply_async, and offloads the protocol decoding to the event listener process by message passing an anonymous function.\r\n\r\nUsers configure the session's event listener with seestar_session:set_event_listener/2. I did not add support for configuring the listener as a part of start_link. A nice way to do so didn't jump out at me, as the event listener doesn't properly belong among ClientOptions or ConnectOptions.\r\n\r\nTested against cassandra 2.0.6.\r\n\r\nNo attempt was made at unit test coverage ... yet.","created_at":"2015-02-03T03:22:56Z","updated_at":"2015-02-03T03:22:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iamaleksey/seestar/pulls/17/commits","review_comments_url":"https://api.github.com/repos/iamaleksey/seestar/pulls/17/comments","review_comment_url":"https://api.github.com/repos/iamaleksey/seestar/pulls/comments/{number}","comments_url":"https://api.github.com/repos/iamaleksey/seestar/issues/17/comments","statuses_url":"https://api.github.com/repos/iamaleksey/seestar/statuses/3e3c20b6fdc11d4989c8e661a466a640c21ddade","head":{"label":"srmerritt:master","ref":"master","sha":"3e3c20b6fdc11d4989c8e661a466a640c21ddade","user":{"login":"srmerritt","id":337621,"avatar_url":"https://avatars.githubusercontent.com/u/337621?v=3","gravatar_id":"","url":"https://api.github.com/users/srmerritt","html_url":"https://github.com/srmerritt","followers_url":"https://api.github.com/users/srmerritt/followers","following_url":"https://api.github.com/users/srmerritt/following{/other_user}","gists_url":"https://api.github.com/users/srmerritt/gists{/gist_id}","starred_url":"https://api.github.com/users/srmerritt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srmerritt/subscriptions","organizations_url":"https://api.github.com/users/srmerritt/orgs","repos_url":"https://api.github.com/users/srmerritt/repos","events_url":"https://api.github.com/users/srmerritt/events{/privacy}","received_events_url":"https://api.github.com/users/srmerritt/received_events","type":"User","site_admin":false},"repo":{"id":30219454,"name":"seestar","full_name":"srmerritt/seestar","owner":{"login":"srmerritt","id":337621,"avatar_url":"https://avatars.githubusercontent.com/u/337621?v=3","gravatar_id":"","url":"https://api.github.com/users/srmerritt","html_url":"https://github.com/srmerritt","followers_url":"https://api.github.com/users/srmerritt/followers","following_url":"https://api.github.com/users/srmerritt/following{/other_user}","gists_url":"https://api.github.com/users/srmerritt/gists{/gist_id}","starred_url":"https://api.github.com/users/srmerritt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srmerritt/subscriptions","organizations_url":"https://api.github.com/users/srmerritt/orgs","repos_url":"https://api.github.com/users/srmerritt/repos","events_url":"https://api.github.com/users/srmerritt/events{/privacy}","received_events_url":"https://api.github.com/users/srmerritt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srmerritt/seestar","description":"The Erlang client for Cassandra 1.2+ binary protocol","fork":true,"url":"https://api.github.com/repos/srmerritt/seestar","forks_url":"https://api.github.com/repos/srmerritt/seestar/forks","keys_url":"https://api.github.com/repos/srmerritt/seestar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srmerritt/seestar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srmerritt/seestar/teams","hooks_url":"https://api.github.com/repos/srmerritt/seestar/hooks","issue_events_url":"https://api.github.com/repos/srmerritt/seestar/issues/events{/number}","events_url":"https://api.github.com/repos/srmerritt/seestar/events","assignees_url":"https://api.github.com/repos/srmerritt/seestar/assignees{/user}","branches_url":"https://api.github.com/repos/srmerritt/seestar/branches{/branch}","tags_url":"https://api.github.com/repos/srmerritt/seestar/tags","blobs_url":"https://api.github.com/repos/srmerritt/seestar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srmerritt/seestar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srmerritt/seestar/git/refs{/sha}","trees_url":"https://api.github.com/repos/srmerritt/seestar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srmerritt/seestar/statuses/{sha}","languages_url":"https://api.github.com/repos/srmerritt/seestar/languages","stargazers_url":"https://api.github.com/repos/srmerritt/seestar/stargazers","contributors_url":"https://api.github.com/repos/srmerritt/seestar/contributors","subscribers_url":"https://api.github.com/repos/srmerritt/seestar/subscribers","subscription_url":"https://api.github.com/repos/srmerritt/seestar/subscription","commits_url":"https://api.github.com/repos/srmerritt/seestar/commits{/sha}","git_commits_url":"https://api.github.com/repos/srmerritt/seestar/git/commits{/sha}","comments_url":"https://api.github.com/repos/srmerritt/seestar/comments{/number}","issue_comment_url":"https://api.github.com/repos/srmerritt/seestar/issues/comments/{number}","contents_url":"https://api.github.com/repos/srmerritt/seestar/contents/{+path}","compare_url":"https://api.github.com/repos/srmerritt/seestar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srmerritt/seestar/merges","archive_url":"https://api.github.com/repos/srmerritt/seestar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srmerritt/seestar/downloads","issues_url":"https://api.github.com/repos/srmerritt/seestar/issues{/number}","pulls_url":"https://api.github.com/repos/srmerritt/seestar/pulls{/number}","milestones_url":"https://api.github.com/repos/srmerritt/seestar/milestones{/number}","notifications_url":"https://api.github.com/repos/srmerritt/seestar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srmerritt/seestar/labels{/name}","releases_url":"https://api.github.com/repos/srmerritt/seestar/releases{/id}","created_at":"2015-02-03T01:57:32Z","updated_at":"2015-02-03T03:02:18Z","pushed_at":"2015-02-03T03:02:18Z","git_url":"git://github.com/srmerritt/seestar.git","ssh_url":"git@github.com:srmerritt/seestar.git","clone_url":"https://github.com/srmerritt/seestar.git","svn_url":"https://github.com/srmerritt/seestar","homepage":"","size":436,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"iamaleksey:master","ref":"master","sha":"9a5c7f42d96633fc9635c04f648b2297c74235ab","user":{"login":"iamaleksey","id":10309,"avatar_url":"https://avatars.githubusercontent.com/u/10309?v=3","gravatar_id":"","url":"https://api.github.com/users/iamaleksey","html_url":"https://github.com/iamaleksey","followers_url":"https://api.github.com/users/iamaleksey/followers","following_url":"https://api.github.com/users/iamaleksey/following{/other_user}","gists_url":"https://api.github.com/users/iamaleksey/gists{/gist_id}","starred_url":"https://api.github.com/users/iamaleksey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamaleksey/subscriptions","organizations_url":"https://api.github.com/users/iamaleksey/orgs","repos_url":"https://api.github.com/users/iamaleksey/repos","events_url":"https://api.github.com/users/iamaleksey/events{/privacy}","received_events_url":"https://api.github.com/users/iamaleksey/received_events","type":"User","site_admin":false},"repo":{"id":7211877,"name":"seestar","full_name":"iamaleksey/seestar","owner":{"login":"iamaleksey","id":10309,"avatar_url":"https://avatars.githubusercontent.com/u/10309?v=3","gravatar_id":"","url":"https://api.github.com/users/iamaleksey","html_url":"https://github.com/iamaleksey","followers_url":"https://api.github.com/users/iamaleksey/followers","following_url":"https://api.github.com/users/iamaleksey/following{/other_user}","gists_url":"https://api.github.com/users/iamaleksey/gists{/gist_id}","starred_url":"https://api.github.com/users/iamaleksey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamaleksey/subscriptions","organizations_url":"https://api.github.com/users/iamaleksey/orgs","repos_url":"https://api.github.com/users/iamaleksey/repos","events_url":"https://api.github.com/users/iamaleksey/events{/privacy}","received_events_url":"https://api.github.com/users/iamaleksey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamaleksey/seestar","description":"The Erlang client for Cassandra 1.2+ binary protocol","fork":false,"url":"https://api.github.com/repos/iamaleksey/seestar","forks_url":"https://api.github.com/repos/iamaleksey/seestar/forks","keys_url":"https://api.github.com/repos/iamaleksey/seestar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamaleksey/seestar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamaleksey/seestar/teams","hooks_url":"https://api.github.com/repos/iamaleksey/seestar/hooks","issue_events_url":"https://api.github.com/repos/iamaleksey/seestar/issues/events{/number}","events_url":"https://api.github.com/repos/iamaleksey/seestar/events","assignees_url":"https://api.github.com/repos/iamaleksey/seestar/assignees{/user}","branches_url":"https://api.github.com/repos/iamaleksey/seestar/branches{/branch}","tags_url":"https://api.github.com/repos/iamaleksey/seestar/tags","blobs_url":"https://api.github.com/repos/iamaleksey/seestar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamaleksey/seestar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamaleksey/seestar/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamaleksey/seestar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamaleksey/seestar/statuses/{sha}","languages_url":"https://api.github.com/repos/iamaleksey/seestar/languages","stargazers_url":"https://api.github.com/repos/iamaleksey/seestar/stargazers","contributors_url":"https://api.github.com/repos/iamaleksey/seestar/contributors","subscribers_url":"https://api.github.com/repos/iamaleksey/seestar/subscribers","subscription_url":"https://api.github.com/repos/iamaleksey/seestar/subscription","commits_url":"https://api.github.com/repos/iamaleksey/seestar/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamaleksey/seestar/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamaleksey/seestar/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamaleksey/seestar/issues/comments/{number}","contents_url":"https://api.github.com/repos/iamaleksey/seestar/contents/{+path}","compare_url":"https://api.github.com/repos/iamaleksey/seestar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamaleksey/seestar/merges","archive_url":"https://api.github.com/repos/iamaleksey/seestar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamaleksey/seestar/downloads","issues_url":"https://api.github.com/repos/iamaleksey/seestar/issues{/number}","pulls_url":"https://api.github.com/repos/iamaleksey/seestar/pulls{/number}","milestones_url":"https://api.github.com/repos/iamaleksey/seestar/milestones{/number}","notifications_url":"https://api.github.com/repos/iamaleksey/seestar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamaleksey/seestar/labels{/name}","releases_url":"https://api.github.com/repos/iamaleksey/seestar/releases{/id}","created_at":"2012-12-17T20:43:50Z","updated_at":"2015-01-22T18:32:33Z","pushed_at":"2015-02-01T16:58:30Z","git_url":"git://github.com/iamaleksey/seestar.git","ssh_url":"git@github.com:iamaleksey/seestar.git","clone_url":"https://github.com/iamaleksey/seestar.git","svn_url":"https://github.com/iamaleksey/seestar","homepage":"","size":436,"stargazers_count":27,"watchers_count":27,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":5,"forks":20,"open_issues":5,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iamaleksey/seestar/pulls/17"},"html":{"href":"https://github.com/iamaleksey/seestar/pull/17"},"issue":{"href":"https://api.github.com/repos/iamaleksey/seestar/issues/17"},"comments":{"href":"https://api.github.com/repos/iamaleksey/seestar/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/iamaleksey/seestar/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/iamaleksey/seestar/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/iamaleksey/seestar/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/iamaleksey/seestar/statuses/3e3c20b6fdc11d4989c8e661a466a640c21ddade"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":76,"deletions":4,"changed_files":3}}