SagaStep

constructor(name: String, action: suspend () -> R, compensation: suspend (R) -> Unit? = null)(source)

Parameters

name

Human-readable name for the step

action

The action to execute

compensation

The compensation action to execute on failure

Type Parameters

R

The result type of the step action