Package-level declarations
Types
Link copied to clipboard
Converts the checkpoints of a thread to and from a string, so a Checkpointer for any storage only has to read and write strings:
Link copied to clipboard
class KotlinxStateSerializer<State>(serializer: KSerializer<State>, json: Json = Json) : StateSerializer<State>
A StateSerializer backed by kotlinx.serialization, for states annotated with @Serializable.
Functions
Link copied to clipboard
Creates a CheckpointCodec for the reified @Serializable State type.
Link copied to clipboard
inline suspend fun <reified T> effect(key: String, json: Json = Json, noinline block: suspend () -> T): T
Runs block, a side effect such as a payment or an email, once for the step of the node that calls it, and returns its result, which a Json of json saves. T is a @Serializable class, a basic type such as String, or Unit for an effect without a result.
Link copied to clipboard
Creates a KotlinxStateSerializer for the reified @Serializable State type.