Beethoven.RoleAlloc.Client (Beethoven v0.2.3)

Client Library for interacting with the RoleAlloc Server

Summary

Functions

Instructs RoleAlloc Server to mark the provided node offline and start reassignment of its roles. Defaults to using the nodeName of the caller unless specified.

Starts Assignment loop on the RoleAlloc Server in the cluster. Assumes RoleServer is running locally.

Starts clean up job on the RoleAlloc Server in the cluster. Assumes RoleServer is running locally.

Same as start_assign/0 but has a defined sleep before sending the cast. Job is done in a task to avoid hanging thread

Same as start_cleanup/0 but has a defined sleep before sending the cast. Job is done in a task to avoid hanging thread

Functions

prune(nodeName \\ node(), timeout \\ 1000)

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

Instructs RoleAlloc Server to mark the provided node offline and start reassignment of its roles. Defaults to using the nodeName of the caller unless specified.

start_assign()

@spec start_assign() :: :ok

Starts Assignment loop on the RoleAlloc Server in the cluster. Assumes RoleServer is running locally.

start_cleanup()

@spec start_cleanup() :: :ok

Starts clean up job on the RoleAlloc Server in the cluster. Assumes RoleServer is running locally.

timed_assign(waitTime \\ 2000)

@spec timed_assign(integer()) :: :ok

Same as start_assign/0 but has a defined sleep before sending the cast. Job is done in a task to avoid hanging thread

timed_cleanup(waitTime \\ 2000)

@spec timed_cleanup(integer()) :: :ok

Same as start_cleanup/0 but has a defined sleep before sending the cast. Job is done in a task to avoid hanging thread