Skip to content

Commit

Permalink
Add ConnPoolStrategy field to client (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thearas authored Jun 7, 2022
1 parent 35aca7b commit 8a32089
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ tags
*.fasthttp.gz
*.fasthttp.br
.idea
.vscode
.DS_Store
vendor/
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit 8a32089

Please sign in to comment.