Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomString ¶
func RandomString() string
Alphanumeric. Specifics may change and it isn't guaranteed to be cryptographically secure
func RedactURLForLog ¶
A {ctx.*} placeholder can resolve to a live credential, so logged URLs must pass through this. Unparseable ones are replaced
Types ¶
type ClientFailure ¶
type ClientFailure struct {
Cause string
Timeout bool
Canceled bool
// The original message with the URL passed through RedactURLForLog. Only for debug logs.
Detail string
}
ClientFailure summarizes an http.Client error. The upstream URL can hold an operator's credentials, and the hostname can too, so Cause and Timeout never include either.
func DescribeClientError ¶
func DescribeClientError(err error) ClientFailure
DescribeClientError is meant for errors from http.Client.Do, which are always a *url.Error.
Click to show internal directories.
Click to hide internal directories.