Polling Engine
object PollingEngine
Production-ready polling engine with exponential backoff and jitter.
Coroutine-friendly, supports cancellation.
Robust handling for rogue CancellationException (treat as retryable error if scope is still active).
Configurable via PollingConfig and BackoffPolicy.
Observability hooks and metrics (optional).
Types
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Compose multiple polling operations sequentially. Stops early on non-success outcomes. Returns the last outcome (success from the last config or the first non-success).
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> startPolling(config: PollingConfig<T>, onComplete: (PollingOutcome<T>) -> Unit): PollingEngine.Handle
Link copied to clipboard