overflow_discovery/server/rpc/server.go

22 lines
363 B
Go
Raw Normal View History

2017-10-31 10:27:26 +00:00
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
}