overflow_discovery/server/rpc/server.go
crusader 9775e5ea4e ing
2017-10-31 19:27:26 +09:00

22 lines
363 B
Go

package rpc
import (
"git.loafle.net/commons_go/rpc"
"git.loafle.net/commons_go/rpc/protocol/json"
rpcServer "git.loafle.net/commons_go/rpc/server"
)
func New(registry rpc.Registry) Server {
sh := NewServerHandler(registry)
sh.RegisterCodec(json.NewServerCodec(), "json")
s := rpcServer.New(sh)
return s
}
type Server interface {
rpcServer.Server
}