1 Star 0 Fork 0

yonglinux / rpcx-examples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.go 817 Bytes
一键复制 编辑 原始数据 按行查看 历史
鸟窝 提交于 2020-05-04 11:03 . move examples to rpcxio/rpcx-examples
// AUTOGENERATED FILE: rpcx server stub code
// compilable during generation.
package main
import (
"flag"
"time"
metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/serverplugin"
"github.com/rpcxio/rpcx-examples/xgen"
)
var (
addr = flag.String("addr", "localhost:8972", "server address")
basePath = flag.String("base", "/rpcx", "prefix path")
)
func main() {
flag.Parse()
_ = time.Second
_ = metrics.UseNilMetrics
_ = serverplugin.GetFunctionName
s := server.NewServer()
addRegistryPlugin(s)
registerServices(s)
s.Serve("tcp", *addr)
}
func registerServices(s *server.Server) {
s.Register(new(xgen.Arith), "")
s.Register(new(xgen.Echo), "")
s.Register(new(xgen.TimeS), "")
}
func addRegistryPlugin(s *server.Server) {
}
1
https://gitee.com/yonglinux/rpcx-examples.git
git@gitee.com:yonglinux/rpcx-examples.git
yonglinux
rpcx-examples
rpcx-examples
v1.1.6

搜索帮助

53164aa7 5694891 3bd8fe86 5694891