微服务框架

lxg 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
.vscode 6d0daf3d0f 添加机器码 il y a 2 ans
broker 6b2af04c1b 更新日志和修改变量 il y a 2 ans
cmd 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
gateway 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
helper 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
log c7dbd344d6 添加微服务架构 il y a 3 ans
registry 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
stats deb58152c1 add prometheus stats il y a 3 ans
sync deb58152c1 add prometheus stats il y a 3 ans
vendor 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
.gitignore deb58152c1 add prometheus stats il y a 3 ans
README.md 1ef67231d2 添加README il y a 3 ans
client.go f6e255690e 优化接口和错误输出 il y a 3 ans
context.go 1b38da8010 remove depend il y a 3 ans
go.mod 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
go.sum 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
micro.go 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans
options.go 0d8da3092f 添加数据上报功能 il y a 2 ans
options_test.go 6d0daf3d0f 添加机器码 il y a 2 ans
reporter.go 2b89837846 rename package il y a 2 ans
reporter_test.go 418ed96554 修复darwin获取机器码出问题 il y a 2 ans
request.go af3a5e48d2 fix log bug il y a 3 ans
response.go 1b38da8010 remove depend il y a 3 ans
service.go 299929e8ee HTTP新增对serverHttp Hook操作 il y a 2 ans

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