package server import ( "git.loafle.net/commons_go/rpc" "git.loafle.net/commons_go/rpc/protocol/json" "git.loafle.net/commons_go/server" dRPC "git.loafle.net/overflow/overflow_discovery/server/rpc" ) func New(addr string) server.Server { registry := rpc.NewRegistry() registry.RegisterCodec(json.NewCodec(), "json") registry.RegisterService(new(dRPC.DiscoveryService), "") sh := NewServerHandler(addr, registry) s := server.NewServer(sh) return s }