View Source Protean.MachineConfig (Protean v0.1.0-alpha.2)
Link to this section Summary
Functions
Data structure representing a Protean machine.
Compute the full set of active nodes for the given states.
Fetch a node by its id. Raises if the node cannot be found.
Compute the initial context for a machine configuration, including any entry actions that result from entering the default states.
Return the full lineage of the given id, including itself and all of its ancestors.
Link to this section Types
@type config() :: keyword()
User-defined machine configuration.
@type t() :: %Protean.MachineConfig{ callback_module: module(), default_assigns: Protean.Context.assigns(), id: binary(), idmap: %{required(Protean.Node.id()) => Protean.Node.t()}, root: Protean.Node.t() }
Internal representation of a Protean machine
Link to this section Functions
Data structure representing a Protean machine.
@spec active(t(), Enumerable.t()) :: MapSet.t(Protean.Node.t())
Compute the full set of active nodes for the given states.
@spec fetch!(t(), Protean.Node.id()) :: Protean.Node.t()
Fetch a node by its id. Raises if the node cannot be found.
@spec initial_context(t()) :: Protean.Context.t()
Compute the initial context for a machine configuration, including any entry actions that result from entering the default states.
@spec lineage(t(), Protean.Node.id()) :: [Protean.Node.t(), ...]
Return the full lineage of the given id, including itself and all of its ancestors.