{"action":"opened","number":46,"pull_request":{"url":"https://api.github.com/repos/vishvananda/netlink/pulls/46","id":42823375,"html_url":"https://github.com/vishvananda/netlink/pull/46","diff_url":"https://github.com/vishvananda/netlink/pull/46.diff","patch_url":"https://github.com/vishvananda/netlink/pull/46.patch","issue_url":"https://api.github.com/repos/vishvananda/netlink/issues/46","number":46,"state":"open","locked":false,"title":"Async updates on links and routes","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"body":"Introduces `LinkSubscribe()` and `RouteSubscribe()` whereby the caller can receive updates over a Go `chan` when links or routes come and go.  Both functions start a goroutine which listens to Netlink, and take an optional `done` parameter which can be closed to terminate the subscription and its goroutine.\r\n\r\nThe object sent is a `LinkUpdate` or `RouteUpdate` struct that describes the thing that changed and also some information to know what happened to it.\r\n\r\nThis PR is the bigger change I alluded to in #45; if accepted I would not need #45 (the key difference being whether `deserializeRoute` is exposed).\r\n","created_at":"2015-08-19T14:49:08Z","updated_at":"2015-08-19T14:49:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vishvananda/netlink/pulls/46/commits","review_comments_url":"https://api.github.com/repos/vishvananda/netlink/pulls/46/comments","review_comment_url":"https://api.github.com/repos/vishvananda/netlink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vishvananda/netlink/issues/46/comments","statuses_url":"https://api.github.com/repos/vishvananda/netlink/statuses/69942a0c81ced97d314cfdf348fb38277aec530c","head":{"label":"bboreham:subscribe","ref":"subscribe","sha":"69942a0c81ced97d314cfdf348fb38277aec530c","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"repo":{"id":40984898,"name":"netlink","full_name":"bboreham/netlink","owner":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bboreham/netlink","description":"Simple netlink library for go.","fork":true,"url":"https://api.github.com/repos/bboreham/netlink","forks_url":"https://api.github.com/repos/bboreham/netlink/forks","keys_url":"https://api.github.com/repos/bboreham/netlink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bboreham/netlink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bboreham/netlink/teams","hooks_url":"https://api.github.com/repos/bboreham/netlink/hooks","issue_events_url":"https://api.github.com/repos/bboreham/netlink/issues/events{/number}","events_url":"https://api.github.com/repos/bboreham/netlink/events","assignees_url":"https://api.github.com/repos/bboreham/netlink/assignees{/user}","branches_url":"https://api.github.com/repos/bboreham/netlink/branches{/branch}","tags_url":"https://api.github.com/repos/bboreham/netlink/tags","blobs_url":"https://api.github.com/repos/bboreham/netlink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bboreham/netlink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bboreham/netlink/git/refs{/sha}","trees_url":"https://api.github.com/repos/bboreham/netlink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bboreham/netlink/statuses/{sha}","languages_url":"https://api.github.com/repos/bboreham/netlink/languages","stargazers_url":"https://api.github.com/repos/bboreham/netlink/stargazers","contributors_url":"https://api.github.com/repos/bboreham/netlink/contributors","subscribers_url":"https://api.github.com/repos/bboreham/netlink/subscribers","subscription_url":"https://api.github.com/repos/bboreham/netlink/subscription","commits_url":"https://api.github.com/repos/bboreham/netlink/commits{/sha}","git_commits_url":"https://api.github.com/repos/bboreham/netlink/git/commits{/sha}","comments_url":"https://api.github.com/repos/bboreham/netlink/comments{/number}","issue_comment_url":"https://api.github.com/repos/bboreham/netlink/issues/comments{/number}","contents_url":"https://api.github.com/repos/bboreham/netlink/contents/{+path}","compare_url":"https://api.github.com/repos/bboreham/netlink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bboreham/netlink/merges","archive_url":"https://api.github.com/repos/bboreham/netlink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bboreham/netlink/downloads","issues_url":"https://api.github.com/repos/bboreham/netlink/issues{/number}","pulls_url":"https://api.github.com/repos/bboreham/netlink/pulls{/number}","milestones_url":"https://api.github.com/repos/bboreham/netlink/milestones{/number}","notifications_url":"https://api.github.com/repos/bboreham/netlink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bboreham/netlink/labels{/name}","releases_url":"https://api.github.com/repos/bboreham/netlink/releases{/id}","created_at":"2015-08-18T16:53:29Z","updated_at":"2015-08-18T16:53:30Z","pushed_at":"2015-08-19T14:42:50Z","git_url":"git://github.com/bboreham/netlink.git","ssh_url":"git@github.com:bboreham/netlink.git","clone_url":"https://github.com/bboreham/netlink.git","svn_url":"https://github.com/bboreham/netlink","homepage":null,"size":610,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"vishvananda:master","ref":"master","sha":"a6d6ef6a6ad588a958d2ff8b570ba39f109d7929","user":{"login":"vishvananda","id":142222,"avatar_url":"https://avatars.githubusercontent.com/u/142222?v=3","gravatar_id":"","url":"https://api.github.com/users/vishvananda","html_url":"https://github.com/vishvananda","followers_url":"https://api.github.com/users/vishvananda/followers","following_url":"https://api.github.com/users/vishvananda/following{/other_user}","gists_url":"https://api.github.com/users/vishvananda/gists{/gist_id}","starred_url":"https://api.github.com/users/vishvananda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishvananda/subscriptions","organizations_url":"https://api.github.com/users/vishvananda/orgs","repos_url":"https://api.github.com/users/vishvananda/repos","events_url":"https://api.github.com/users/vishvananda/events{/privacy}","received_events_url":"https://api.github.com/users/vishvananda/received_events","type":"User","site_admin":false},"repo":{"id":23529571,"name":"netlink","full_name":"vishvananda/netlink","owner":{"login":"vishvananda","id":142222,"avatar_url":"https://avatars.githubusercontent.com/u/142222?v=3","gravatar_id":"","url":"https://api.github.com/users/vishvananda","html_url":"https://github.com/vishvananda","followers_url":"https://api.github.com/users/vishvananda/followers","following_url":"https://api.github.com/users/vishvananda/following{/other_user}","gists_url":"https://api.github.com/users/vishvananda/gists{/gist_id}","starred_url":"https://api.github.com/users/vishvananda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishvananda/subscriptions","organizations_url":"https://api.github.com/users/vishvananda/orgs","repos_url":"https://api.github.com/users/vishvananda/repos","events_url":"https://api.github.com/users/vishvananda/events{/privacy}","received_events_url":"https://api.github.com/users/vishvananda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vishvananda/netlink","description":"Simple netlink library for go.","fork":false,"url":"https://api.github.com/repos/vishvananda/netlink","forks_url":"https://api.github.com/repos/vishvananda/netlink/forks","keys_url":"https://api.github.com/repos/vishvananda/netlink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vishvananda/netlink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vishvananda/netlink/teams","hooks_url":"https://api.github.com/repos/vishvananda/netlink/hooks","issue_events_url":"https://api.github.com/repos/vishvananda/netlink/issues/events{/number}","events_url":"https://api.github.com/repos/vishvananda/netlink/events","assignees_url":"https://api.github.com/repos/vishvananda/netlink/assignees{/user}","branches_url":"https://api.github.com/repos/vishvananda/netlink/branches{/branch}","tags_url":"https://api.github.com/repos/vishvananda/netlink/tags","blobs_url":"https://api.github.com/repos/vishvananda/netlink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vishvananda/netlink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vishvananda/netlink/git/refs{/sha}","trees_url":"https://api.github.com/repos/vishvananda/netlink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vishvananda/netlink/statuses/{sha}","languages_url":"https://api.github.com/repos/vishvananda/netlink/languages","stargazers_url":"https://api.github.com/repos/vishvananda/netlink/stargazers","contributors_url":"https://api.github.com/repos/vishvananda/netlink/contributors","subscribers_url":"https://api.github.com/repos/vishvananda/netlink/subscribers","subscription_url":"https://api.github.com/repos/vishvananda/netlink/subscription","commits_url":"https://api.github.com/repos/vishvananda/netlink/commits{/sha}","git_commits_url":"https://api.github.com/repos/vishvananda/netlink/git/commits{/sha}","comments_url":"https://api.github.com/repos/vishvananda/netlink/comments{/number}","issue_comment_url":"https://api.github.com/repos/vishvananda/netlink/issues/comments{/number}","contents_url":"https://api.github.com/repos/vishvananda/netlink/contents/{+path}","compare_url":"https://api.github.com/repos/vishvananda/netlink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vishvananda/netlink/merges","archive_url":"https://api.github.com/repos/vishvananda/netlink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vishvananda/netlink/downloads","issues_url":"https://api.github.com/repos/vishvananda/netlink/issues{/number}","pulls_url":"https://api.github.com/repos/vishvananda/netlink/pulls{/number}","milestones_url":"https://api.github.com/repos/vishvananda/netlink/milestones{/number}","notifications_url":"https://api.github.com/repos/vishvananda/netlink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vishvananda/netlink/labels{/name}","releases_url":"https://api.github.com/repos/vishvananda/netlink/releases{/id}","created_at":"2014-09-01T03:28:37Z","updated_at":"2015-08-07T07:49:25Z","pushed_at":"2015-08-19T10:43:25Z","git_url":"git://github.com/vishvananda/netlink.git","ssh_url":"git@github.com:vishvananda/netlink.git","clone_url":"https://github.com/vishvananda/netlink.git","svn_url":"https://github.com/vishvananda/netlink","homepage":null,"size":610,"stargazers_count":64,"watchers_count":64,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":3,"forks":25,"open_issues":3,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vishvananda/netlink/pulls/46"},"html":{"href":"https://github.com/vishvananda/netlink/pull/46"},"issue":{"href":"https://api.github.com/repos/vishvananda/netlink/issues/46"},"comments":{"href":"https://api.github.com/repos/vishvananda/netlink/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/vishvananda/netlink/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/vishvananda/netlink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vishvananda/netlink/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/vishvananda/netlink/statuses/69942a0c81ced97d314cfdf348fb38277aec530c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":113,"deletions":43,"changed_files":3}}