Concord.StateMachine.Core (Concord v3.0.2)

Copy Markdown View Source

Protocol-independent deterministic Concord state machine.

This module owns all authoritative service data. It does not access ETS, clocks, processes, telemetry, storage, or a replication protocol.

Summary

Types

query_context()

@type query_context() ::
  %{timestamp_ms: non_neg_integer()} | Concord.StateMachine.Core.Context.t()

Functions

apply(context, command, state)

init(opts \\ [])

query(query, state, context)

restore(entries)

@spec restore(term()) :: {:ok, Concord.StateMachine.Core.State.t()} | {:error, term()}

snapshot(state)

@spec snapshot(Concord.StateMachine.Core.State.t()) :: {:ok, map()} | {:error, term()}