overflow_discovery/server/server.go
crusader b30f3d10ea ing
2017-12-05 14:58:32 +09:00

22 lines
510 B
Go

package server
import (
crr "git.loafle.net/commons_go/rpc/registry"
"git.loafle.net/commons_go/server"
"git.loafle.net/overflow/overflow_discovery/service"
oopcs "git.loafle.net/overflow/overflow_probe_container/server"
)
func New(addr string) server.Server {
rpcRegistry := crr.NewRPCRegistry()
service.RegisterRPC(rpcRegistry)
rpcSH := oopcs.NewRPCServletHandler(rpcRegistry)
socketHandler := newSocketHandler(rpcSH)
sh := newServerHandler(addr, socketHandler)
s := oopcs.New(sh)
return s
}