微服务框架

lxg 08465bb774 rpc请求服务端添加重试处理 3 lat temu
.vscode 6d0daf3d0f 添加机器码 3 lat temu
broker 12f5ddb50a 修复获取ID错误 3 lat temu
cmd ef8ce4cd6e 添加cli工具 3 lat temu
gateway 1e91789c78 添加终端支持unix形式连接 3 lat temu
helper 12f5ddb50a 修复获取ID错误 3 lat temu
log c7dbd344d6 添加微服务架构 4 lat temu
registry ae2b2c050a 修复select获取到的服务可能不可用的情况 3 lat temu
stats deb58152c1 add prometheus stats 3 lat temu
sync deb58152c1 add prometheus stats 3 lat temu
vendor 299929e8ee HTTP新增对serverHttp Hook操作 3 lat temu
.gitignore deb58152c1 add prometheus stats 3 lat temu
README.md 1ef67231d2 添加README 4 lat temu
client.go 08465bb774 rpc请求服务端添加重试处理 3 lat temu
context.go 1b38da8010 remove depend 4 lat temu
global.go e9be5a2951 处理微服务组件支持全局注册方式 3 lat temu
go.mod 299929e8ee HTTP新增对serverHttp Hook操作 3 lat temu
go.sum 299929e8ee HTTP新增对serverHttp Hook操作 3 lat temu
micro.go 299929e8ee HTTP新增对serverHttp Hook操作 3 lat temu
options.go 555cd5b130 优化接口参数返回 3 lat temu
options_test.go 6d0daf3d0f 添加机器码 3 lat temu
reporter.go 2b89837846 rename package 3 lat temu
reporter_test.go 418ed96554 修复darwin获取机器码出问题 3 lat temu
request.go af3a5e48d2 fix log bug 3 lat temu
response.go 1b38da8010 remove depend 4 lat temu
service.go 08465bb774 rpc请求服务端添加重试处理 3 lat temu

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