微服务框架

lxg 15225e2407 优化cli模块 hace 3 años
.vscode 6d0daf3d0f 添加机器码 hace 3 años
broker 20607b7e02 修复broker组件死锁问题 hace 3 años
cmd 15225e2407 优化cli模块 hace 3 años
gateway 15225e2407 优化cli模块 hace 3 años
helper 15225e2407 优化cli模块 hace 3 años
log c7dbd344d6 添加微服务架构 hace 3 años
registry d4313ba5d9 添加全局HTTP客户端 hace 3 años
stats deb58152c1 add prometheus stats hace 3 años
sync deb58152c1 add prometheus stats hace 3 años
vendor 299929e8ee HTTP新增对serverHttp Hook操作 hace 3 años
.gitignore deb58152c1 add prometheus stats hace 3 años
README.md 1ef67231d2 添加README hace 3 años
client.go f6e255690e 优化接口和错误输出 hace 3 años
context.go 1b38da8010 remove depend hace 3 años
global.go e9be5a2951 处理微服务组件支持全局注册方式 hace 3 años
go.mod 299929e8ee HTTP新增对serverHttp Hook操作 hace 3 años
go.sum 299929e8ee HTTP新增对serverHttp Hook操作 hace 3 años
micro.go 299929e8ee HTTP新增对serverHttp Hook操作 hace 3 años
options.go 0d8da3092f 添加数据上报功能 hace 3 años
options_test.go 6d0daf3d0f 添加机器码 hace 3 años
reporter.go 2b89837846 rename package hace 3 años
reporter_test.go 418ed96554 修复darwin获取机器码出问题 hace 3 años
request.go af3a5e48d2 fix log bug hace 3 años
response.go 1b38da8010 remove depend hace 3 años
service.go 24ba46aaf1 添加一些工具类 hace 3 años

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