overflow_probe_container_ne.../server/server.go

22 lines
530 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"
)
2017-12-14 08:51:08 +00:00
func New(pidPath string) server.Server {
2017-12-04 11:59:11 +00:00
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)
2017-12-14 08:51:08 +00:00
sh := newServerHandler(pidPath, socketHandler)
2017-12-05 06:09:04 +00:00
s := oopcs.New(sh)
2017-12-04 11:59:11 +00:00
return s
}