mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-26 17:46:34 +03:00
Add ConnPoolStrategy field to client (#1317)
This commit is contained in:
@@ -3,5 +3,6 @@ tags
|
||||
*.fasthttp.gz
|
||||
*.fasthttp.br
|
||||
.idea
|
||||
.vscode
|
||||
.DS_Store
|
||||
vendor/
|
||||
|
||||
@@ -297,6 +297,9 @@ type Client struct {
|
||||
// By default will use isIdempotent function
|
||||
RetryIf RetryIfFunc
|
||||
|
||||
// Connection pool strategy. Can be either LIFO or FIFO (default).
|
||||
ConnPoolStrategy ConnPoolStrategyType
|
||||
|
||||
// ConfigureClient configures the fasthttp.HostClient.
|
||||
ConfigureClient func(hc *HostClient) error
|
||||
|
||||
@@ -510,6 +513,7 @@ func (c *Client) Do(req *Request, resp *Response) error {
|
||||
DisablePathNormalizing: c.DisablePathNormalizing,
|
||||
MaxConnWaitTimeout: c.MaxConnWaitTimeout,
|
||||
RetryIf: c.RetryIf,
|
||||
ConnPoolStrategy: c.ConnPoolStrategy,
|
||||
clientReaderPool: &c.readerPool,
|
||||
clientWriterPool: &c.writerPool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user