go-zero
go-zero copied to clipboard
A cloud-native Go microservices framework with cli tool for productivity.
#gateway main file package main import ( "cloudPhoneGateway/pkg/gateway" "flag" "github.com/zeromicro/go-zero/core/conf" ) var configFile = flag.String("f", "etc/gateway.yaml", "config file") func main() { flag.Parse() var c gateway.GatewayConf conf.MustLoad(*configFile, &c) gw := gateway.MustNewServer(c)...
I hope to support proto to support the generation of multiple files at the same time as soon as possible. Just like the generation of api, multiple protos can be...
go-zero v1.4.2 output `{"@timestamp":"2022-11-11T14:14:53.635+08:00","caller":"internal/rpclogger.go:30","content":"[transport]transport: loopyWriter.run returning. Err: transport: Connection closing","level":"error"}`
**Describe the bug** 1. GatewayConf.Timeout如果要设置超时,在yaml格式的配置文件中,该怎么写? 我试了写8s, 8000都不可以。 2. GatewayConf.Timeout 和 GatewayConf.RestConf.Timeout 冲突了,因为RestConf是匿名的。这个无法通过配置文件配置了。只能在代码里面写。 2.1 GateConf.Timeout的生效位置是在使用grpcurl.InvokeRPC()的时候,使用这个参数构建了一个Timeout Context。 GatewayConf.RestConf.Timeout的生效位置有两个,一个是基于此参数配置了原生http.Server的ReadTimeout和WriteTimeout,另外一个是在http的Server端的http超时拦截器中。 我测试过,如果我们的业务逻辑处理时间超过GatewayConf.Timeout 或者 超过 GatewayConf.RestConf.Timeout,都会出现504的错误 **To Reproduce** Steps to reproduce the behavior, if applicable: 1....
goctl自动生成model代码时,应该添加分页查询/列表查询的可选参数。 就如 https://github.com/zeromicro/go-zero/issues/548#issuecomment-799149315 所说 ———————————————————————————————— When goctl automatically generates model code, optional parameters for paging query/list query should be added. Just like https://github.com/zeromicro/go-zero/issues/548#issuecomment-799149315
![image](https://user-images.githubusercontent.com/64348131/221767350-acfb118f-b17d-474c-824d-2d8ea143e379.png) hope to get compatible with thirdparty proto
go mod tidy go: finding module for package github.com/zeromicro/go-zero/core/logx go: finding module for package github.com/zeromicro/go-zero/core/conf go: finding module for package github.com/zeromicro/go-zero/rest go: finding module for package github.com/zeromicro/go-zero/rest/httpx go: found github.com/zeromicro/go-zero/core/conf...
Supports zrpc error custom handling, like httpx.seterrorhandler
Hello, I think the TracingHandler in the handle package of rest should support reading the X-Request-ID in http.Request through the configuration file. I think that in a single project, TracingHandler...
**Describe the bug** I generate go api code and logic code function is unconsistence with handler function define. **To Reproduce** this is my api proto define: 1. The code is...