TimeoutTriggered

data class TimeoutTriggered(val timeout: Duration) : ResilientEvent

Emitted when the operation exceeds the configured timeout and is cancelled.

Note: A timeout always produces two events in sequence:

  1. TimeoutTriggered — emitted immediately before the kotlinx.coroutines.TimeoutCancellationException propagates.

  2. OperationFailure — emitted from the outer execution wrapper with the same exception.

If a FallbackTriggered follows instead of OperationFailure, a Fallback policy is configured and the timeout was caught by it (which is unexpected — timeouts are kotlinx.coroutines.CancellationException and are not swallowed by com.santimattius.resilient.fallback.FallbackPolicy). Consumers should treat TimeoutTriggered as the definitive signal of a timeout, and avoid double-counting OperationFailure for metric purposes.

Constructors

Link copied to clipboard
constructor(timeout: Duration)

Properties

Link copied to clipboard

The configured timeout duration that was exceeded.