Spectre.Determinism.Source behaviour (Spectre v0.3.2)

Copy Markdown View Source

Host port for decision-relevant clock and randomness samples.

The default implementation delegates to the Erlang runtime. Replay and audit integrations may provide a source through :determinism_source; the source is resolved at the boundary and is never persisted inside a Run.

Summary

Types

monotonic_time_unit()

@type monotonic_time_unit() :: time_unit() | :native

time_unit()

@type time_unit() :: System.time_unit()

Callbacks

monotonic_time(monotonic_time_unit, keyword)

@callback monotonic_time(
  monotonic_time_unit(),
  keyword()
) :: integer()

random_bytes(non_neg_integer, keyword)

@callback random_bytes(
  non_neg_integer(),
  keyword()
) :: binary()

system_time(time_unit, keyword)

@callback system_time(
  time_unit(),
  keyword()
) :: integer()