fail

fun fail(failure: TransportFailure, delay: Duration = Duration.ZERO): Step(source)

Fails with failure: execute returns Result.failure(failure), the same instance on every repeat.

Return

the step.

Parameters

failure

the transport failure.

delay

the delay before the failure; zero by default.

Throws


fun fail(delay: Duration = Duration.ZERO, failure: () -> TransportFailure): Step(source)

Fails with a fresh failure from failure on every call.

Return

the step.

Parameters

delay

the delay before the failure; zero by default.

failure

builds the transport failure, once per call.

Throws