微服务框架

sugar 5de44d9888 修复代码问题 2 yıl önce
cmd deb58152c1 add prometheus stats 2 yıl önce
gateway 5de44d9888 修复代码问题 2 yıl önce
log c7dbd344d6 添加微服务架构 3 yıl önce
registry deb58152c1 add prometheus stats 2 yıl önce
stats deb58152c1 add prometheus stats 2 yıl önce
sync deb58152c1 add prometheus stats 2 yıl önce
utils deb58152c1 add prometheus stats 2 yıl önce
vendor deb58152c1 add prometheus stats 2 yıl önce
.gitignore deb58152c1 add prometheus stats 2 yıl önce
README.md 1ef67231d2 添加README 3 yıl önce
client.go f6e255690e 优化接口和错误输出 3 yıl önce
context.go 1b38da8010 remove depend 3 yıl önce
go.mod deb58152c1 add prometheus stats 2 yıl önce
go.sum deb58152c1 add prometheus stats 2 yıl önce
micro.go 695cf2e23a 添加数据上报 3 yıl önce
options.go deb58152c1 add prometheus stats 2 yıl önce
options_test.go 695cf2e23a 添加数据上报 3 yıl önce
request.go 077f216cae add request call method 3 yıl önce
response.go 1b38da8010 remove depend 3 yıl önce
service.go deb58152c1 add prometheus stats 2 yıl önce

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