Controller Service proxies rpc calls to the corresponding servers

This commit is contained in:
Krishna Srinivas
2015-09-19 01:30:09 -07:00
parent c953b0dab3
commit e600bd6b4f
12 changed files with 263 additions and 141 deletions
+2 -2
View File
@@ -25,13 +25,13 @@ import (
)
// getRPCHandler rpc handler
func getRPCHandler() http.Handler {
func getRPCCtrlHandler() http.Handler {
s := jsonrpc.NewServer()
s.RegisterCodec(json.NewCodec(), "application/json")
s.RegisterService(new(VersionService), "Version")
s.RegisterService(new(DonutService), "Donut")
s.RegisterService(new(AuthService), "Auth")
s.RegisterService(new(ServerService), "Server")
s.RegisterService(new(controllerServerRPCService), "Server")
// Add new RPC services here
return registerRPC(router.NewRouter(), s)
}