Beethoven.RoleServer (Beethoven v0.3.7)

Server PID that manages role assignment across the cluster. Leveraging the Mnesia integration with DistrServer, these processes will be ephemeral and keep all state within Mnesia.

Summary

Types

Alias for atom().

Simplified type for tracker records. Just excludes the table name from the record tuple.

List of roleRecord() objects.

Functions

Returns a specification to start this module under a supervisor.

Manually copy the tracking DB to the node.

Starts assignment job on the RoleServer.

Supervisor Entry point.

Types

roleName()

@type roleName() :: atom()

Alias for atom().

roleRecord()

@type roleRecord() ::
  {roleName :: atom(), roleModule :: module(), args :: any(),
   instances :: integer()}

Simplified type for tracker records. Just excludes the table name from the record tuple.

roleRecords()

@type roleRecords() :: [roleRecord()]

List of roleRecord() objects.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

copy_tracker()

@spec copy_tracker() :: :ok | :already_exists | {:error, any()}

Manually copy the tracking DB to the node.

start_assign()

@spec start_assign() :: :ok

Starts assignment job on the RoleServer.

start_link(init_args \\ [])

@spec start_link(any()) :: GenServer.on_start()

Supervisor Entry point.