UrlFetcherConfig

The configuration of a UrlFetcher: the receiver of the factory's lambda. Stable Core. Not thread-safe; use it only inside the lambda.

Types

Link copied to clipboard
object Companion

The default of defaultMaxWait.

Properties

Link copied to clipboard

The call budget fetches are charged to; CallBudget.Unlimited by default. Caller-owned: the fetcher never closes it, and owns none.

Link copied to clipboard

The longest a fetch waits for a budget permit before it fails with HttpFailure.BudgetExhausted, which carries the wait the fetch would have needed. Defaults to 5 seconds (DEFAULT_MAX_WAIT), long enough to ride out a burst over a window of a few seconds and short enough that a person waiting on the fetch sees the failure before the transport's call timeout is added to it: a fetch's worst-case latency is this value plus the call timeout. A wait for a window of a minute or longer, or for a server-requested pause, is normally longer and fails at once. Use Duration.ZERO to never wait and Duration.INFINITE to wait as long as the plan needs (up to the budget's pause cap). Meaningful only with a budget that waits; CallBudget.Unlimited grants at once. A per-fetch FetchSpec.maxWait overrides it. Not negative.

Link copied to clipboard

Reads rate signals from each response; RateSignalsReader.Standard by default.

Link copied to clipboard

Measures the per-fetch waited and elapsed figures in the log; TimeSource.Monotonic by default.

Link copied to clipboard

The wall clock read for each response's signals; WallClock.System by default.