Documentation
¶
Overview ¶
Package googleclient owns transport policies shared by Google resource clients.
Index ¶
- Constants
- func LogError(ctx context.Context, err error, sensitiveValues ...string)
- func NewHTTPClient(timeout time.Duration, transport http.RoundTripper) *http.Client
- func ReadResponse(body io.Reader, limit int64) ([]byte, error)
- func StatusError(status int) error
- func TransportError(ctx context.Context, err error) error
Constants ¶
const DefaultMaxResponseBytes = 10 * 1024 * 1024
DefaultMaxResponseBytes is the common budget before resource-specific narrowing.
Variables ¶
This section is empty.
Functions ¶
func LogError ¶
LogError retains provider diagnostics without dumping response bodies or detail payloads.
func NewHTTPClient ¶
NewHTTPClient uses the caller's transport without discovering credentials, retrying requests, or following redirects. Resources own host restrictions and deadlines.
func ReadResponse ¶
ReadResponse checks the byte budget before provider decoding. Read errors are left intact for resource retry classification and must be mapped before exposure.
func StatusError ¶
StatusError deliberately excludes provider bodies and headers from diagnostics.
Types ¶
This section is empty.