微服务框架

lxg d7e2948b9e 新增单条命令执行功能 hace 2 años
.vscode 6d0daf3d0f 添加机器码 hace 2 años
broker 12f5ddb50a 修复获取ID错误 hace 2 años
cmd d7e2948b9e 新增单条命令执行功能 hace 2 años
gateway d7e2948b9e 新增单条命令执行功能 hace 2 años
helper adc810093d 新增命令行支持参数 hace 2 años
log adc810093d 新增命令行支持参数 hace 2 años
registry ae2b2c050a 修复select获取到的服务可能不可用的情况 hace 2 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 2 años
.gitignore deb58152c1 add prometheus stats hace 3 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 e9be5a2951 处理微服务组件支持全局注册方式 hace 2 años
go.mod 299929e8ee HTTP新增对serverHttp Hook操作 hace 2 años
go.sum 299929e8ee HTTP新增对serverHttp Hook操作 hace 2 años
micro.go fb25a01734 修复组件BUG hace 2 años
options.go d148437165 server添加上下文的支持 hace 2 años
options_test.go 6d0daf3d0f 添加机器码 hace 2 años
reporter.go 2b89837846 rename package hace 2 años
reporter_test.go 418ed96554 修复darwin获取机器码出问题 hace 2 años
request.go af3a5e48d2 fix log bug hace 2 años
response.go 1b38da8010 remove depend hace 3 años
service.go 56b828534d 网关修改分配比较方案 hace 2 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())
}