Beethoven.RoleMgmt.Assign (Beethoven v0.3.9)
Server to track nodes and their role assignments.
Once boot, the service will assign one of each open roles to itself.
These roles are cast to the Manager
service to spawn the roles.
Failover of roles across the cluster is handled by the Failover
service.
Summary
Functions
Returns a specification to start this module under a supervisor.
Similar to :mnesia.dirty_select/2
but only needs the match spec as an argument.
The table name of the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table is input automatically as the 1st arity.
Fetches data from the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Uses a record key to query the data. Will return all matching records.
Fetches all records from the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Returns the name of the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Supervisor Entry point.
Subscribes to the table mapped to the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Checks if the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table exists.
Holds the thread until the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table becomes available, or timeout occurs.
Defaults to 1_000
milliseconds for timeouts and 15
milliseconds for checking intervals.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec dirty_select(:ets.match_spec()) :: [tuple()] | list()
Similar to :mnesia.dirty_select/2
but only needs the match spec as an argument.
The table name of the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table is input automatically as the 1st arity.
Fetches data from the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Uses a record key to query the data. Will return all matching records.
Fetches all records from the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Returns the name of the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
@spec start_link(any()) :: GenServer.on_start()
Supervisor Entry point.
@spec subscribe(:simple | :detailed) :: :ok
Subscribes to the table mapped to the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table.
Matches based on subscription
:simple
{:mnesia_table_event, {:atom, record(), _op_data}}
:detailed
{:mnesia_table_event, {:atom, module() | :atom(), record(), [] | [record()], _op_data}}
@spec table_exists?() :: boolean()
Checks if the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table exists.
Holds the thread until the DistrServer Elixir.Beethoven.RoleMgmt.Assign
's mnesia table becomes available, or timeout occurs.
Defaults to 1_000
milliseconds for timeouts and 15
milliseconds for checking intervals.