SagaStep

data class SagaStep<R, T>(val name: String, val action: suspend () -> R, val compensation: suspend (R) -> Unit? = null)(source)

Represents a single step in a saga.

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

Constructors

Link copied to clipboard
constructor(name: String, action: suspend () -> R, compensation: suspend (R) -> Unit? = null)

Properties

Link copied to clipboard
val action: suspend () -> R
Link copied to clipboard
val compensation: suspend (R) -> Unit?
Link copied to clipboard