Beethoven.Role.Client (Beethoven v0.2.3)

Client library for accessing and communicating with the Role Server.

Summary

Functions

Adds a role to the Role server. Role must already be defined in the config.

Adds a role to the Role server. Role must already be defined in the config. The same as add_role/1 but ran on an external node.

Removes all roles from the Role server.

Removes all roles from the Role server. The same as kill_all_roles/0 but ran on an external node.

Removes a role from the Role server.

Removes a role from the Role server. The same as kill_role/1 but ran on an external node.

Functions

add_role(role)

@spec add_role(atom()) :: :assigned | {:error, any()}

Adds a role to the Role server. Role must already be defined in the config.

add_role_remote(role, nodeName, timeout \\ 2000)

@spec add_role_remote(atom(), node(), integer()) ::
  :assigned | {:error, :timeout | any()}

Adds a role to the Role server. Role must already be defined in the config. The same as add_role/1 but ran on an external node.

kill_all_roles()

@spec kill_all_roles() :: :ok

Removes all roles from the Role server.

kill_all_roles_remote(nodeName, timeout \\ 1000)

@spec kill_all_roles_remote(node(), integer()) :: :ok | {:error, :timeout}

Removes all roles from the Role server. The same as kill_all_roles/0 but ran on an external node.

kill_role(role)

@spec kill_role(atom()) :: :dead | {:error, :not_here}

Removes a role from the Role server.

kill_role_remote(role, nodeName, timeout \\ 1000)

@spec kill_role_remote(atom(), node(), integer()) ::
  :dead | {:error, :timeout | :not_here}

Removes a role from the Role server. The same as kill_role/1 but ran on an external node.