overflow_probe_container_ne.../server/server.go

22 lines
524 B
Go
Raw Normal View History

2017-12-04 11:59:11 +00:00
package server
import (
crr "git.loafle.net/commons_go/rpc/registry"
"git.loafle.net/commons_go/server"
2017-12-05 06:09:04 +00:00
oopcs "git.loafle.net/overflow/overflow_probe_container/server"
2017-12-04 11:59:11 +00:00
"git.loafle.net/overflow/overflow_probe_container_network/service"
)
func New(addr string) server.Server {
rpcRegistry := crr.NewRPCRegistry()
service.RegisterRPC(rpcRegistry)
2017-12-05 06:09:04 +00:00
rpcSH := oopcs.NewRPCServletHandler(rpcRegistry)
2017-12-04 11:59:11 +00:00
socketHandler := newSocketHandler(rpcSH)
sh := newServerHandler(addr, socketHandler)
2017-12-05 06:09:04 +00:00
s := oopcs.New(sh)
2017-12-04 11:59:11 +00:00
return s
}