Spectre.Run.Ref (Spectre v0.3.0)

Copy Markdown View Source

Opaque, revision-fenced reference to an observable point in a Spectre.Run.

A reference contains only logical identifiers. It is therefore safe to put on a transport envelope or use as part of an idempotency key; it never contains the Run continuation, runtime options, provider clients, or process handles.

Summary

Functions

Returns a stable, privacy-safe token suitable for transport idempotency.

Types

kind()

@type kind() :: :reply | :policy | :invocation | :complete | :error

t()

@type t() :: %Spectre.Run.Ref{
  boundary_id: String.t(),
  kind: kind(),
  revision: non_neg_integer(),
  run_id: String.t(),
  subject_id: String.t() | nil
}

Functions

token(ref)

@spec token(t()) :: String.t()

Returns a stable, privacy-safe token suitable for transport idempotency.