微服务框架

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

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())
}