微服务框架

fancl 1d70d0eb25 fix cli long response hai 1 ano
.vscode 6d0daf3d0f 添加机器码 %!s(int64=2) %!d(string=hai) anos
broker 26a3e72515 修复问题 hai 1 ano
cmd 26a3e72515 修复问题 hai 1 ano
gateway 1d70d0eb25 fix cli long response hai 1 ano
helper bdc67c60d7 修改aes panic错误 hai 1 ano
log 9e30db74c4 优化服务接口 %!s(int64=2) %!d(string=hai) anos
registry ae2b2c050a 修复select获取到的服务可能不可用的情况 %!s(int64=2) %!d(string=hai) anos
stats deb58152c1 add prometheus stats %!s(int64=3) %!d(string=hai) anos
sync deb58152c1 add prometheus stats %!s(int64=3) %!d(string=hai) anos
vendor 7d0b299319 添加支持服务shutdown %!s(int64=2) %!d(string=hai) anos
.gitignore 8bba61a314 修改数据上报接口 %!s(int64=2) %!d(string=hai) anos
README.md 1ef67231d2 添加README %!s(int64=3) %!d(string=hai) anos
client.go 08465bb774 rpc请求服务端添加重试处理 %!s(int64=2) %!d(string=hai) anos
context.go 1b38da8010 remove depend %!s(int64=3) %!d(string=hai) anos
global.go c78754eeca 优化框架代码 %!s(int64=2) %!d(string=hai) anos
go.mod 018cfe5200 优化数据统计 %!s(int64=2) %!d(string=hai) anos
go.sum 018cfe5200 优化数据统计 %!s(int64=2) %!d(string=hai) anos
micro.go fb25a01734 修复组件BUG %!s(int64=2) %!d(string=hai) anos
options.go c78754eeca 优化框架代码 %!s(int64=2) %!d(string=hai) anos
options_test.go 1d70d0eb25 fix cli long response hai 1 ano
reporter.go 0beddb8656 add cli handle option supported %!s(int64=2) %!d(string=hai) anos
request.go bdc67c60d7 修改aes panic错误 hai 1 ano
response.go 1b38da8010 remove depend %!s(int64=3) %!d(string=hai) anos
service.go e94c344b81 update package name hai 1 ano

README.md

提供基本的服务框架

使用示例:

import (
	"git.nspix.com/golang/micro"
	"git.nspix.com/golang/micro/gateway"
	"git.nspix.com/golang/micro/log"
)

func main() {
	svr := micro.New(micro.WithName("test", "0.1.01"))

	svr.Handle("math.add", func(ctx gateway.Context) (err error) {
		return ctx.Success(100)
	})

	log.Debug(svr.Run())
}