You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 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 |
28
28
| 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. |
29
29
| WithReadTimeout | time.Duration | The timeout of data reading. Default:3min. |
30
30
| WithIdleTimeout | time.Duration | The free timeout of the request link for persistent connection. Default: 3min. |
| WithMaxConnsPerHost | int | Set the maximum number of connections for every host. Default: 0 (<=0 means unlimited). |
85
85
| 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). |
87
87
| WithMaxConnWaitTimeout | time.Duration | Set the maximum time to wait for an idle connection. Default: no wait. |
88
88
| WithKeepAlive | bool | Whether to use persistent connection. Default: true. |
89
89
| 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))`|
90
90
|~~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. |
91
91
| WithClientReadTimeout | time.Duration | Set the maximum time to read the response. Default: 0 (unlimited). Recommended to set an explicit timeout in production. |
92
92
| 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. |
94
94
| WithResponseBodyStream | bool | Set whether to use stream processing. Default: false. |
95
95
| WithDialFunc | client.DialFunc | Set Dial Function. |
96
96
| WithWriteTimeout | time.Duration | The timeout of data writing. Default: 0 (unlimited). |
| WithClientReadTimeout | 0s | maximum duration for full response reading (including body). Default 0 means unlimited |
64
64
| 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. |
66
66
| WithResponseBodyStream | false | determine whether read body in stream or not, default not read in stream. |
67
67
| WithDisableHeaderNamesNormalizing | false | whether disable header names normalizing, default not disabled, for example, cONTENT-lenGTH -> Content-Length. |
68
68
| WithName | "" | set client name which used in User-Agent Header. |
0 commit comments