Skip to content

Commit 5252c1d

Browse files
authored
docs(hertz): fix outdated doc of hertz server config (#1408)
1 parent b2eb9d5 commit 5252c1d

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

content/en/docs/hertz/getting-started/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,17 @@ For more information on how to use hz, please refer to: [hz](/zh/docs/hertz/tuto
119119
- Code generation by specifying an already defined idl file, e.g. `hz new -idl hello.thrift`.
120120

121121
```thrift
122-
// idl/hello.thrift
122+
// ./hello.thrift
123123
namespace go hello.example
124-
124+
125125
struct HelloReq {
126126
1: string Name (api.query="name"); // Add api annotation for easy parameter binding
127127
}
128-
128+
129129
struct HelloResp {
130130
1: string RespBody;
131131
}
132-
132+
133133
service HelloService {
134134
HelloResp HelloMethod(1: HelloReq request) (api.get="/hello");
135135
}
@@ -180,7 +180,7 @@ You have now successfully launched Hertz Server successfully and completed two A
180180
If you need to make further updates to the project, you should use the `hz update` command, here is an example of adding a `Bye` method.
181181

182182
```thrift
183-
// idl/hello.thrift
183+
// ./hello.thrift
184184
namespace go hello.example
185185
186186
struct HelloReq {

content/en/docs/hertz/tutorials/basic-feature/engine.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ type Hertz struct {
3232
| WithUnescapePathValues | true | If true, the request path will be escaped automatically (eg. '%2F' -> '/'). If UseRawPath is false (the default), UnescapePathValues is true, because URI().Path() will be used and it is already escaped. To set WithUnescapePathValues to false, you need to set WithUseRawPath to true |
3333
| WithUseRawPath | false | If true, the original path will be used to match the route |
3434
| WithHandleMethodNotAllowed | false | If true when the current path cannot match any method, the server will check whether other methods are registered with the route of the current path, and if exist other methods, it will respond "Method Not Allowed" and return the status code 405; if not, it will use the handler of NotFound to handle it |
35-
| WithDisablePreParseMultipartForm | false | If true, the multipart form will not be preprocessed. The body can be obtained via c.Request.Body() and then can be processed by user |
35+
| WithDisablePreParseMultipartForm | false | If true, the multipart form will not be preprocessed. The body can be obtained via c.Request.Body() and then can be processed by user |
3636
| WithStreamBody | false | If true, the body will be handled by stream processing |
3737
| WithNetwork | "tcp" | Set the network protocol, optional: tcp,udp,unix(unix domain socket) |
3838
| WithExitWaitTime | 5s | Set the graceful exit time. the Server will stop connection establishment for new requests and set the Connection: Close header for each request after closing. When the set time is reached, Server will to be closed. the Server can be closed early when all connections have been closed |
39-
| WithTLS | nil | Configuring server tls capabilities, For detailed information, please refer to [TLS](/zh/docs/hertz/tutorials/basic-feature/tls/) |
39+
| WithTLS | nil | Configuring server tls capabilities, For detailed information, please refer to [TLS](/zh/docs/hertz/tutorials/basic-feature/tls/) |
4040
| WithListenConfig | nil | Set the listener configuration. Can be used to set whether to allow reuse ports, etc. |
4141
| WithALPN | false | Whether to enable ALPN |
4242
| WithTracer | []interface{}{} | Inject tracer implementation, if not inject Tracer, default: close. |
@@ -49,7 +49,7 @@ type Hertz struct {
4949
| WithKeepAlive | true | If enabled, use HTTP keepalive |
5050
| WithAltTransport | network.NewTransporter | Set up the alternate transport |
5151
| WithH2C | false | Sets whether H2C is enabled |
52-
| WithReadBufferSize | 4 \* 1024 | Set the read buffer size while limiting the HTTP header size |
52+
| WithReadBufferSize | 4 \* 1024 | Set the read buffer size |
5353
| WithRegistry | registry.NoopRegistry, nil | Setup registry configuration, service registration information |
5454
| WithAutoReloadRender | false, 0 | Set up the automatic reload rendering configuration |
5555
| WithDisablePrintRoute | false | Sets whether debugPrintRoute is disabled |

content/zh/docs/hertz/tutorials/basic-feature/engine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Hertz struct {
3636
| WithStreamBody | false | 如果开启,则会使用流式处理 body |
3737
| WithNetwork | "tcp" | 设置网络协议,可选:tcp,udp,unix(unix domain socket),默认为 tcp |
3838
| WithExitWaitTime | 5s | 设置优雅退出时间。Server 会停止建立新的连接,并对关闭后的每一个请求设置 Connection: Close 的 header,当到达设定的时间关闭 Server。当所有连接已经关闭时,Server 可以提前关闭 |
39-
| WithTLS | nil | 配置 server tls 能力,详情可见 [TLS](/zh/docs/hertz/tutorials/basic-feature/tls/) |
39+
| WithTLS | nil | 配置 server tls 能力,详情可见 [TLS](/zh/docs/hertz/tutorials/basic-feature/tls/) |
4040
| WithListenConfig | nil | 设置监听器配置,可用于设置是否允许 reuse port 等 |
4141
| WithALPN | false | 是否开启 ALPN |
4242
| WithTracer | []interface{}{} | 注入 tracer 实现,如不注入 Tracer 实现,默认关闭 |
@@ -49,7 +49,7 @@ type Hertz struct {
4949
| WithKeepAlive | true | 如果开启则使用 HTTP 长连接 |
5050
| WithAltTransport | network.NewTransporter | 设置备用 transport |
5151
| WithH2C | false | 设置是否开启 H2C |
52-
| WithReadBufferSize | 4 \* 1024 | 设置读缓冲区大小,同时限制 HTTP header 大小 |
52+
| WithReadBufferSize | 4 \* 1024 | 设置读缓冲区大小 |
5353
| WithRegistry | registry.NoopRegistry, nil | 设置注册中心配置,服务注册信息 |
5454
| WithAutoReloadRender | false, 0 | 设置自动重载渲染配置 |
5555
| WithDisablePrintRoute | false | 设置是否禁用 debugPrintRoute |

0 commit comments

Comments
 (0)