Beethoven.RoleMgmt.Manager (Beethoven v0.3.9)
Dynamic supervisor that manages the specialized role PIDs.
Public API
add_role/3
Adds a role to the Manager Dynamic Supervisor. Stores role name + PID in ETS.remove_role/1
Removes a hosted role from the Dynamic Supervisor.
The use of ETS is just for tracking atomic role names to PIDs. It has no awareness of the cluster level allocations for this role.
Summary
Functions
Adds a role to the Elixir.Beethoven.RoleMgmt.Manager
Dynamic Supervisor. Adds the pid + roleName to ETS for tracking.
If the role already exists, :ok
will still be returned.
Returns a specification to start this module under a supervisor.
Removes the role from the Elixir.Beethoven.RoleMgmt.Manager
Dynamic Supervisor.
Supervisor Entry point.
Functions
Adds a role to the Elixir.Beethoven.RoleMgmt.Manager
Dynamic Supervisor. Adds the pid + roleName to ETS for tracking.
If the role already exists, :ok
will still be returned.
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec remove_role(atom()) :: :ok | {:error, :not_found}
Removes the role from the Elixir.Beethoven.RoleMgmt.Manager
Dynamic Supervisor.
@spec start_link(any()) :: GenServer.on_start()
Supervisor Entry point.