Skip to content

Commit fab5b48

Browse files
committed
doc(hertz): fix instruction
1 parent b827825 commit fab5b48

8 files changed

Lines changed: 29 additions & 42 deletions

File tree

content/en/docs/hertz/reference/config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ func main() {
2323

2424
| Configuration Name | Type | Description |
2525
| :-------------------------------- | :----------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26-
| WithTransport | network.NewTransporter | Replace the transport. The default depends on platform and environment variables: netpoll on linux/darwin with amd64/arm64 when `HERTZ_NO_NETPOLL` is not set; falls back to standard for TLS; standard otherwise. |
27-
| WithHostPorts | string | Specify the listening address and port. Default: 8888 |
26+
| WithTransport | network.NewTransporter | Replace the transport. The default depends on platform and environment variables: netpoll on linux/darwin with amd64/arm64 when `HERTZ_NO_NETPOLL=true` is not set; falls back to standard for TLS; standard otherwise. |
27+
| WithHostPorts | string | Specify the listening address and port. Default: :8888 |
2828
| WithKeepAliveTimeout | time.Duration | Set the keep-alive time of tcp persistent connection, generally no need to modify it, you should more pay attention to idleTimeout rather than modifying it. Default: 1min. |
2929
| WithReadTimeout | time.Duration | The timeout of data reading. Default:3min. |
3030
| WithIdleTimeout | time.Duration | The free timeout of the request link for persistent connection. Default: 3min. |
@@ -83,14 +83,14 @@ func main() {
8383
| WithDialTimeout | time.Duration | Connection establishment timeout. Default: 1s. |
8484
| WithMaxConnsPerHost | int | Set the maximum number of connections for every host. Default: 0 (<=0 means unlimited). |
8585
| WithMaxIdleConnDuration | time.Duration | Set the idle connection timeout, which will close the connection after the timeout Default: 10s. |
86-
| WithMaxConnDuration | time.Duration | Set the maximum keep-alive time of the connection, when the timeout expired, the connection will be closed after the current request is completed. Default: infinite. |
86+
| WithMaxConnDuration | time.Duration | Set the maximum keep-alive time of the connection, when the timeout expired, the connection will be closed after the current request is completed. Default: 0 (unlimited). |
8787
| WithMaxConnWaitTimeout | time.Duration | Set the maximum time to wait for an idle connection. Default: no wait. |
8888
| WithKeepAlive | bool | Whether to use persistent connection. Default: true. |
8989
| WithRetryConfig | ...retry.Option | Set the retry config of client. Hertz version >= v0.4.0. Not enabled by default; calling `WithRetryConfig()` sets `MaxAttemptTimes=1` (no retry). To enable retry, set explicitly, e.g.: `client.WithRetryConfig(retry.WithMaxAttemptTimes(3))` |
9090
| ~~WithMaxIdempotentCallAttempts~~ | int | Set the maximum number of calls. If a call fails, it will be retried. Default: 1 (That is no retry). v0.4.0 is obsolete. Only available before v0.4.0. It is recommended to upgrade Hertz version >= v0.4.0 and use WithRetryConfig instead. |
9191
| WithClientReadTimeout | time.Duration | Set the maximum time to read the response. Default: 0 (unlimited). Recommended to set an explicit timeout in production. |
9292
| WithTLSConfig | \*tls.Config | Set the client's TLS config for mutual TLS authentication. |
93-
| WithDialer | network.Dialer | Set the network library used by the client. The default depends on platform and environment variables: netpoll on linux/darwin with amd64/arm64 when `HERTZ_NO_NETPOLL` is not set; falls back to standard for TLS; standard otherwise. |
93+
| WithDialer | network.Dialer | Set the network library used by the client. The default depends on platform and environment variables: netpoll on linux/darwin with amd64/arm64 when `HERTZ_NO_NETPOLL=true` is not set; falls back to standard for TLS; standard otherwise. |
9494
| WithResponseBodyStream | bool | Set whether to use stream processing. Default: false. |
9595
| WithDialFunc | client.DialFunc | Set Dial Function. |
9696
| WithWriteTimeout | time.Duration | The timeout of data writing. Default: 0 (unlimited). |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func main() {
6262
| WithKeepAlive | true | determines whether use keep-alive connection, default use. |
6363
| WithClientReadTimeout | 0s | maximum duration for full response reading (including body). Default 0 means unlimited |
6464
| WithTLSConfig | nil | tlsConfig to create a tls connection, for specific configuration information, please refer to [tls](/docs/hertz/tutorials/basic-feature/tls/). |
65-
| WithDialer | network.Dialer | specific dialer. The default depends on platform: netpoll on linux/darwin with amd64/arm64 when `HERTZ_NO_NETPOLL` is not set; falls back to standard for TLS; standard otherwise. |
65+
| WithDialer | network.Dialer | specific dialer. The default depends on platform: netpoll on linux/darwin with amd64/arm64 when `HERTZ_NO_NETPOLL=true` is not set; falls back to standard for TLS; standard otherwise. |
6666
| WithResponseBodyStream | false | determine whether read body in stream or not, default not read in stream. |
6767
| WithDisableHeaderNamesNormalizing | false | whether disable header names normalizing, default not disabled, for example, cONTENT-lenGTH -> Content-Length. |
6868
| WithName | "" | set client name which used in User-Agent Header. |

0 commit comments

Comments
 (0)