Documentation
¶
Overview ¶
Package netcause names the cause of a transport-level failure, so a request that never left the machine is not reported as a credential or server problem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Denied ¶
Denied reports whether the operating system refused the connection itself (EPERM/EACCES from connect), as a sandbox or firewall does. Nothing reached the server, so no credential change can fix it.
func Hint ¶
Hint explains a transport failure whose cause can be named, or returns "" when it cannot, or when Transport already added the explanation to err. A failed DNS lookup is named but not attributed: a blocked resolver and a host that does not exist look the same from here.
func Transport ¶
func Transport(next http.RoundTripper) http.RoundTripper
Transport returns next wrapped so a transport failure whose cause Hint can name carries that explanation in its message; the original error stays in the chain for errors.Is. Wrap at the base of a client's chain, so requests a higher transport synthesizes itself (token exchange, discovery) are covered too.
Types ¶
This section is empty.