WideEventClient

interface WideEventClient

Functions

Link copied to clipboard
abstract suspend fun flowAbort(wideEventId: Long): Result<Unit>

Abort an active flow and discard all data (nothing is sent).

Link copied to clipboard
abstract suspend fun flowFinish(wideEventId: Long, status: FlowStatus, metadata: Map<String, String> = emptyMap()): Result<Unit>

Finish an active flow and send it with a terminal status.

Link copied to clipboard
abstract suspend fun flowStart(name: String, flowEntryPoint: String? = null, metadata: Map<String, String> = emptyMap(), cleanupPolicy: CleanupPolicy = OnTimeout(duration = Duration.ofDays(7))): Result<Long>

Begin a new flow.

Link copied to clipboard
abstract suspend fun flowStep(wideEventId: Long, stepName: String, success: Boolean = true, metadata: Map<String, String> = emptyMap()): Result<Unit>

Record a step in an active flow.

Link copied to clipboard
abstract suspend fun getFlowIds(name: String): Result<List<Long>>

Get ids of active flows by their name. Ids are ordered chronologically based on wide event creation time.

Link copied to clipboard
abstract suspend fun intervalEnd(wideEventId: Long, key: String): Result<Duration>

End a previously started interval.

Link copied to clipboard
abstract suspend fun intervalStart(wideEventId: Long, key: String, timeout: Duration? = null): Result<Unit>

Start a named interval inside the flow.