Beethoven.Ready (Beethoven v0.3.3)

Simple PID to track when Beethoven has fully initialized. Usually just called from RoleServer when it has ran out of work.

Summary

Functions

Returns a specification to start this module under a supervisor.

Gets the current ready state for Beethoven.

Sets ready state for Beethoven. Setting this value to true will make ready?() return true; indicating the service has initialized. Setting false performs the opposite.

Supervisor Entry point.

Similar to ready?() but will block until the service is ready. Defaults to 5_000 milliseconds.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

ready?()

@spec ready?() :: boolean()

Gets the current ready state for Beethoven.

set_ready(ready_state)

@spec set_ready(boolean()) :: :ok

Sets ready state for Beethoven. Setting this value to true will make ready?() return true; indicating the service has initialized. Setting false performs the opposite.

start_link(init_args \\ [])

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

Supervisor Entry point.

until_ready(timeout \\ 5000)

@spec until_ready(integer()) :: :ok | :timeout

Similar to ready?() but will block until the service is ready. Defaults to 5_000 milliseconds.