yar.go:yar.go

时间:2021-05-10 12:19:57
【文件属性】:
文件名称:yar.go:yar.go
文件大小:16KB
文件格式:ZIP
更新时间:2021-05-10 12:19:57
Go Yar.go 是一个的实现 特性 支持http客户端 支持基于任意web框架部署server 支持动态参数列表,但不支持默认值 Example Server package main import ( "io/ioutil" "log" "net/http" "github.com/weixinhost/yar.go" "github.com/weixinhost/yar.go/server" ) //这里是Yar 需要Handle的结构 type YarClass struct{} //远程Rpc方法 func (c *YarClass) Echo() string { log.Println("echo handler") return "string" } func main() { //本示例使用了golang 自带的http 包实现http服务器。
【文件预览】:
yar.go-master
----client_exmaple()
--------client.go(663B)
----server_example()
--------main.go(772B)
----README.md(2KB)
----request.go(379B)
----header.go(2KB)
----packager()
--------json.go(312B)
--------msgpack.go(160B)
--------packager.go(633B)
----server()
--------server.go(11KB)
----opt.go(1KB)
----client()
--------utils.go(495B)
--------utils_test.go(1KB)
--------dns.go(1KB)
--------client.go(5KB)
----transports()
--------http.go(2KB)
--------transport.go(547B)
--------sock.go(2KB)
----response.go(645B)
----errors.go(1KB)

网友评论