aboutsummaryrefslogtreecommitdiff
path: root/tcpdialer.go
AgeCommit message (Collapse)AuthorFilesLines
14 daysfeat: add address to tryDial errors (#1763)Gravatar Max Denushev 1-6/+41
* fix: propagate body stream error to close function (#1743) * feat: add address in ErrDialTimeout * feat: add address in any `tryDial` error * feat: use struct to wrap error with upstream info * fix: lint * fix: wrapped Error() method * docs: add example to ErrDialWithUpstream * feat: add address in ErrDialTimeout * feat: add address in any `tryDial` error * feat: use struct to wrap error with upstream info * fix: lint * fix: wrapped Error() method * docs: add example to ErrDialWithUpstream * docs: fix example for ErrDialWithUpstream --------- Co-authored-by: Max Denushev <denushev@tochka.com>
2024-02-10add DisableDNSResolution for TCPDialer. Sometimes, users do not need to use ↵Gravatar Zhengkai Wang 1-10/+15
DNS resolution because they have already determined that the requested address is a list of IP addresses. (#1702) Co-authored-by: wangzhengkai.wzk <wangzhengkai.wzk@alibaba-inc.com>
2023-12-05chore: Set max line length to 130 characters (#1676)Gravatar Oleksandr Redko 1-1/+3
2023-11-27add support for custom dial function with timeouts (#1669)Gravatar Aviv Carmi 1-4/+4
* add support for custom dial function with timeouts * fix linting --------- Co-authored-by: Aviv Carmi <aviv@perimeterx.com>
2023-11-24chore: Use 'any' instead of 'interface{}' (#1666)Gravatar Oleksandr Redko 1-1/+1
gofmt -w -r "interface{} -> any" -l .
2023-11-24Enable wastedassign, whitespace linters; fix issues (#1665)Gravatar Oleksandr Redko 1-1/+0
2023-06-25Use timeout in TCPDialer to resolveTCPAddrs (#1582)Gravatar un000 1-6/+7
2023-06-13Enable gofumpt linter; format code `gofumpt -w .` (#1576)v1.48.0Gravatar Oleksandr Redko 1-3/+1
2023-02-10Rename unexported funcs, vars to match common Go (#1488)Gravatar Oleksandr Redko 1-2/+2
See https://github.com/golang/go/wiki/CodeReviewComments#initialisms and https://go.dev/doc/effective_go#mixed-caps
2022-11-16Use time.Until(deadline) instead of -time.Since(deadline) (#1434)Gravatar Andy Pan 1-1/+1
2022-08-14Add Go 1.19 Support (#1355)v1.39.0Gravatar Aoang 1-44/+44
* Update Go Version to Go1.19.x And add cache * Fix CI Line endings * Update test CI Go Version to Go1.19.x And add cache * Update Gosec Security Scanner CI to securego/gosec@v2.12.0 * Format comment Go 1.19 adds support for links, lists, and clearer headings in doc comments. As part of this change, gofmt now reformats doc comments to make their rendered meaning clearer. See “Go Doc Comments” for syntax details and descriptions of common mistakes now highlighted by gofmt. As another part of this change, the new package go/doc/comment provides parsing and reformatting of doc comments as well as support for rendering them to HTML, Markdown, and text. ref: https://tip.golang.org/doc/go1.19 ref: https://tip.golang.org/doc/comment * Fix doc structure
2022-01-09Update tcpdialer.go (#1188)Gravatar Mikhail Faraponov 1-1/+1
2021-10-29Fix race condition in getTCPAddrsGravatar Erik Dubbelboer 1-6/+9
2021-09-20feat: improve TCPDialer by `sync.map` instead of `map+mutex` (#1106)Gravatar tyltr 1-22/+14
2021-06-18TCPDialer :: DNSCacheDuration option (#1046)Gravatar Ertuğrul Emre Ertekin 1-10/+18
* DefaultDNSCacheDuration :: Changed to `var` * Revert "DefaultDNSCacheDuration :: Changed to `var`" This reverts commit d836eace9f709b5993d73830aa12d5a2f548ce0d. * TCPDialer :: DNSCacheDuration option * TCPDialer :: DNSCacheDuration option - comment added * TCPDialer :: DNSCacheDuration option - comment fixed
2020-11-07add nil check for LocalAddr (#907)Gravatar Shohi Wang 1-1/+5
2020-10-03tryDial timeout (#881)Gravatar Vitali Pikulik 1-36/+7
* Change tryDial to handle timeout correctly * fasthttpproxy/http.go accepts timeout * Fix example doc Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com> * Improve import in httpproxy * Simplify tryDial * Cleanup * Wait for concurrencyCh Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2020-03-10Add LocalAddr to TCPDialerGravatar Erik Dubbelboer 1-3/+8
2020-01-12Fix TCPDialer is not setting ZoneIDv1.8.0Gravatar Erik Dubbelboer 1-0/+1
Fixes https://github.com/valyala/fasthttp/issues/724
2020-01-12Resolve code issues from goreportcard.com (#725)Gravatar Andy Pan 1-1/+2
2019-11-25Custom LookupIPAddr function (#699)Gravatar Nikolay Markov 1-3/+7
* Custom LookupIPAddr function * use interface instead of pointer
2019-11-10Ability to pass custom DNS resolver to TCPDialer (#689)Gravatar Nikolay Markov 1-7/+26
* Ability to pass custom DNS resolver to TCPdialer * Update tcpdialer.go Co-Authored-By: Erik Dubbelboer <erik@dubbelboer.com>
2019-02-04Add TCPDialerGravatar Erik Dubbelboer 1-84/+163
2019-02-03change timer to public api #525 (#527)Gravatar xuecai 1-4/+4
* change acquireTimer and releaseTimer to public api
2016-10-29Issue #196: avoid returning (nil, nil) from fasthttp.Dial*Gravatar Aliaksandr Valialkin 1-4/+6
2016-05-16removed memory allocations from tryDial. This should improve performance for ↵Gravatar Aliaksandr Valialkin 1-6/+33
non-keepalive connections
2016-01-29tcpdialer: limit the number of concurrent dialersGravatar Aliaksandr Valialkin 1-8/+30
2016-01-28Client: fixed a bug with improper dial timeout calculation on dial errorsGravatar Aliaksandr Valialkin 1-3/+4
2016-01-28Client: increased default dial timeout in order to minimize the number of ↵Gravatar Aliaksandr Valialkin 1-1/+1
goroutines blocked in Dial
2016-01-18Fixed a typoGravatar Aliaksandr Valialkin 1-1/+1
2016-01-18Added DialTimeout and DialDualStackTimeout functionsGravatar Aliaksandr Valialkin 1-26/+110
2016-01-15Dial all the resolved TCP addresses in round-robin manner until the ↵Gravatar Aliaksandr Valialkin 1-26/+45
connection is established
2016-01-15Limit the maximum time for establishing TCP connection in Dial and DialDualStackGravatar Aliaksandr Valialkin 1-2/+44
2015-12-08Made Dial and DialFunc more visible in the documentationGravatar Aliaksandr Valialkin 1-9/+27
2015-12-07Removed DialTLS*, since it must be handled by client codeGravatar Aliaksandr Valialkin 1-41/+1
2015-12-07typo fixGravatar Aliaksandr Valialkin 1-1/+1
2015-12-07Exported default TCP dialers used by clients, so custom wrappers may be ↵Gravatar Aliaksandr Valialkin 1-0/+194
implemented around these dialers