Documentation
¶
Overview ¶
Package transport provides a flavor-agnostic HTTP layer: a thin client that applies request decorators (auth, user-agent) and retries transient failures.
This package backs the openobserve-cli command layer and is also importable as a library; see the repository README. The CLI relies on its retry, timeout and decorator behavior; change it additively and keep the defaults stable rather than tuning them for a single local call site.
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.