{"action":"created","issue":{"url":"https://api.github.com/repos/NebulousLabs/Sia/issues/294","labels_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/294/comments","events_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/294/events","html_url":"https://github.com/NebulousLabs/Sia/issues/294","id":55803494,"number":294,"title":"RegisterRPCs should all be in one function","user":{"login":"lukechampine","id":3344749,"avatar_url":"https://avatars.githubusercontent.com/u/3344749?v=3","gravatar_id":"","url":"https://api.github.com/users/lukechampine","html_url":"https://github.com/lukechampine","followers_url":"https://api.github.com/users/lukechampine/followers","following_url":"https://api.github.com/users/lukechampine/following{/other_user}","gists_url":"https://api.github.com/users/lukechampine/gists{/gist_id}","starred_url":"https://api.github.com/users/lukechampine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukechampine/subscriptions","organizations_url":"https://api.github.com/users/lukechampine/orgs","repos_url":"https://api.github.com/users/lukechampine/repos","events_url":"https://api.github.com/users/lukechampine/events{/privacy}","received_events_url":"https://api.github.com/users/lukechampine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lukechampine","id":3344749,"avatar_url":"https://avatars.githubusercontent.com/u/3344749?v=3","gravatar_id":"","url":"https://api.github.com/users/lukechampine","html_url":"https://github.com/lukechampine","followers_url":"https://api.github.com/users/lukechampine/followers","following_url":"https://api.github.com/users/lukechampine/following{/other_user}","gists_url":"https://api.github.com/users/lukechampine/gists{/gist_id}","starred_url":"https://api.github.com/users/lukechampine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukechampine/subscriptions","organizations_url":"https://api.github.com/users/lukechampine/orgs","repos_url":"https://api.github.com/users/lukechampine/repos","events_url":"https://api.github.com/users/lukechampine/events{/privacy}","received_events_url":"https://api.github.com/users/lukechampine/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-28T19:31:19Z","updated_at":"2015-01-28T20:21:41Z","closed_at":null,"body":"All of the JSON API calls are registered in one function, `d.listen` (formerly `d.handle`). I feel that this serves as good \"self-documentation.\" The RPCs should be the same way. Currently, some are registered by `NewTCPServer`, and the rest are initialized by `newDaemon`."},"comment":{"url":"https://api.github.com/repos/NebulousLabs/Sia/issues/comments/71908418","html_url":"https://github.com/NebulousLabs/Sia/issues/294#issuecomment-71908418","issue_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/294","id":71908418,"user":{"login":"lukechampine","id":3344749,"avatar_url":"https://avatars.githubusercontent.com/u/3344749?v=3","gravatar_id":"","url":"https://api.github.com/users/lukechampine","html_url":"https://github.com/lukechampine","followers_url":"https://api.github.com/users/lukechampine/followers","following_url":"https://api.github.com/users/lukechampine/following{/other_user}","gists_url":"https://api.github.com/users/lukechampine/gists{/gist_id}","starred_url":"https://api.github.com/users/lukechampine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukechampine/subscriptions","organizations_url":"https://api.github.com/users/lukechampine/orgs","repos_url":"https://api.github.com/users/lukechampine/repos","events_url":"https://api.github.com/users/lukechampine/events{/privacy}","received_events_url":"https://api.github.com/users/lukechampine/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T20:21:41Z","updated_at":"2015-01-28T20:21:41Z","body":"One downside to this is that it means we have to export the network RPCs. Right now, functions like `sharePeers` are unexported, which means they can *only* be called via RPC. Not a big deal, but enough to make me reconsider this plan."}}