1 Star 0 Fork 0

yonglinux / rpcx-sun-examples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
server.go 404 Bytes
一键复制 编辑 原始数据 按行查看 历史
root 提交于 2022-02-17 17:49 . update
package main
import (
"flag"
example "github.com/rpcxio/rpcx-examples"
"github.com/smallnest/rpcx/reflection"
"github.com/smallnest/rpcx/server"
)
var (
addr = flag.String("addr", "localhost:8972", "server address")
)
func main() {
flag.Parse()
s := server.NewServer()
p := reflection.New()
s.Plugins.Add(p)
s.Register(new(example.Arith), "")
s.Register(p, "")
s.Serve("tcp", *addr)
}
1
https://gitee.com/yonglinux/rpcx-sun-examples.git
git@gitee.com:yonglinux/rpcx-sun-examples.git
yonglinux
rpcx-sun-examples
rpcx-sun-examples
v1.1.8

搜索帮助

53164aa7 5694891 3bd8fe86 5694891