Documentation
¶
Overview ¶
Package transport provides a flavor-agnostic HTTP layer: a thin client that applies request decorators (auth, user-agent) and retries transient failures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a retrying HTTP client. It is flavor-agnostic: callers build fully formed *http.Request values and Client only adds decorators and retries.
type Options ¶
type Options struct {
// Doer executes requests. Defaults to an *http.Client with Timeout.
Doer Doer
// Timeout is the per-request timeout when Doer is nil.
Timeout time.Duration
// MaxRetries is the number of additional attempts after the first failure.
MaxRetries int
// RetryBaseDelay is the base backoff delay; the Nth retry waits N*base.
RetryBaseDelay time.Duration
// Decorators are applied to every request in order.
Decorators []Decorator
}
Options configures a Client.
Click to show internal directories.
Click to hide internal directories.