Spectre.Operation.ExecutionContext (Spectre v0.3.0)

Copy Markdown View Source

Ephemeral context passed to one registered operation executor.

Summary

Functions

Emits throttled progress for the current attempt.

Types

t()

@type t() :: %Spectre.Operation.ExecutionContext{
  agent: module(),
  attempt: Spectre.Operation.Attempt.t(),
  cognitive: map(),
  controller: module(),
  input: term(),
  loop_id: String.t(),
  loop_kind: atom(),
  metadata: map(),
  opts: keyword(),
  progress: (term(), map() -> :ok),
  state: term(),
  subject: Spectre.Subject.t()
}

Functions

progress(execution_context, value, metadata \\ %{})

@spec progress(t(), term(), map()) :: :ok

Emits throttled progress for the current attempt.