Single-node instance manager backed by one Spex.InstanceManager.Server process.
Use this manager when you want all instance operations handled by a single GenServer and a single DETS table.
See Spex for info on using this instance manager.
Configuration
SimpleInstanceManager forwards server options to Spex.InstanceManager.Server (see
Spex.InstanceManager.Server.server_opt()), with one internal detail:
:dets_tableis always set toSpex.InstanceManager.SimpleInstanceManagerby this module and should not be provided by callers.
Supported options (see Spex):
:impl_models_dir(String.t()) Path to.speximplementation model files loaded on startup. Default: value from config or else"./spex_impl_models".:dets_dir(String.t()) Directory where the DETS file for this manager is stored. Default: value from config or else"./spex_dets".:check_transition_timeouts_on_start?(boolean()) Whentrue, existing instances in DETS are checked during startup and transition timeout errors are emitted if needed. Default:true.:prune_interval(timeout()) Interval for periodic pruning checks. Use:infinityto disable periodic checks after startup. Default:%Duration{hour: 6} |> to_timeout().
Pruning semantics:
- one prune pass is always executed immediately on startup,
- when
:prune_interval != :infinity, additional periodic prune passes are scheduled, - when
:prune_interval == :infinity, no periodic passes are scheduled after the initial startup pass.
Option resolution order
For each server option, effective value is resolved in this order:
- option passed to
start_link/1/ supervisor child spec, - application environment key under
:spex, - the default value.
Summary
Functions
Callback implementation for Spex.InstanceManager.all_impl_models/0.
Callback implementation for Spex.InstanceManager.all_instances/0.
Callback implementation for Spex.InstanceManager.all_instances/1.
Callback implementation for Spex.InstanceManager.child_spec/1.
Callback implementation for Spex.InstanceManager.delete_instance/1.
Callback implementation for Spex.InstanceManager.delete_instances/1.
Callback implementation for Spex.InstanceManager.export_impl_models/0.
Callback implementation for Spex.InstanceManager.get_instance/1.
Callback implementation for Spex.InstanceManager.init_instance/4.
Callback implementation for Spex.InstanceManager.init_instance!/4.
Callback implementation for Spex.InstanceManager.init_instance_async/4.
Callback implementation for Spex.InstanceManager.mock_instance!/4.
Callback implementation for Spex.InstanceManager.start_link/1.
Callback implementation for Spex.InstanceManager.transition/3.
Callback implementation for Spex.InstanceManager.transition!/3.
Callback implementation for Spex.InstanceManager.transition_async/3.
Functions
Callback implementation for Spex.InstanceManager.all_impl_models/0.
Callback implementation for Spex.InstanceManager.all_instances/0.
Callback implementation for Spex.InstanceManager.all_instances/1.
Callback implementation for Spex.InstanceManager.child_spec/1.
Callback implementation for Spex.InstanceManager.delete_instance/1.
Callback implementation for Spex.InstanceManager.delete_instances/1.
Callback implementation for Spex.InstanceManager.export_impl_models/0.
Callback implementation for Spex.InstanceManager.get_instance/1.
Callback implementation for Spex.InstanceManager.init_instance/4.
Callback implementation for Spex.InstanceManager.init_instance!/4.
Callback implementation for Spex.InstanceManager.init_instance_async/4.
Callback implementation for Spex.InstanceManager.mock_instance!/4.
Callback implementation for Spex.InstanceManager.start_link/1.
Callback implementation for Spex.InstanceManager.transition/3.
Callback implementation for Spex.InstanceManager.transition!/3.
Callback implementation for Spex.InstanceManager.transition_async/3.