微服务框架

lxg af3a5e48d2 fix log bug пре 3 година
cmd deb58152c1 add prometheus stats пре 3 година
gateway af3a5e48d2 fix log bug пре 3 година
log c7dbd344d6 添加微服务架构 пре 4 година
registry deb58152c1 add prometheus stats пре 3 година
stats deb58152c1 add prometheus stats пре 3 година
sync deb58152c1 add prometheus stats пре 3 година
utils deb58152c1 add prometheus stats пре 3 година
vendor deb58152c1 add prometheus stats пре 3 година
.gitignore deb58152c1 add prometheus stats пре 3 година
README.md 1ef67231d2 添加README пре 4 година
client.go f6e255690e 优化接口和错误输出 пре 4 година
context.go 1b38da8010 remove depend пре 4 година
go.mod deb58152c1 add prometheus stats пре 3 година
go.sum deb58152c1 add prometheus stats пре 3 година
micro.go 695cf2e23a 添加数据上报 пре 4 година
options.go af3a5e48d2 fix log bug пре 3 година
options_test.go 695cf2e23a 添加数据上报 пре 4 година
request.go af3a5e48d2 fix log bug пре 3 година
response.go 1b38da8010 remove depend пре 4 година
service.go af3a5e48d2 fix log bug пре 3 година

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