微服务框架

lxg 6a712ef9b6 添加方法暴露 hace 4 años
.idea 6a712ef9b6 添加方法暴露 hace 4 años
gateway 6a712ef9b6 添加方法暴露 hace 4 años
log c7dbd344d6 添加微服务架构 hace 4 años
registry 3f4e39d35b fix bug hace 4 años
utils 4104302b97 处理系统功能 hace 4 años
.gitignore 4104302b97 处理系统功能 hace 4 años
README.md 1ef67231d2 添加README hace 4 años
client.go 8c49c442c0 修复问题 hace 4 años
context.go 1b38da8010 remove depend hace 4 años
go.mod 1b38da8010 remove depend hace 4 años
go.sum 1b38da8010 remove depend hace 4 años
micro.go 9dc1bd2de6 add custom http path hace 4 años
options.go 5d56a411be 添加日志管理 hace 4 años
request.go 077f216cae add request call method hace 4 años
response.go 1b38da8010 remove depend hace 4 años
service.go 6a712ef9b6 添加方法暴露 hace 4 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())
}