View Source Conion.Store.Server (conion v0.1.0)

Conion's Store Server (DataGateway)

Summary

Functions

safely call the GenServer.callback return an error tuple if the bucket is not alive

safely cast the GenServer.callback return an error tuple if the bucket is not alive

Returns a specification to start this module under a supervisor.

Returns the state of a server. You can pass an atom or pid.

Overridable

Start the server with either

Functions

call(pid_or_name, message)

safely call the GenServer.callback return an error tuple if the bucket is not alive

call_or_error(bool, name_or_pid, message)

cast(pid_or_name, message)

safely cast the GenServer.callback return an error tuple if the bucket is not alive

cast_or_error(bool, name_or_pid, message)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_state(pid_or_atom)

Returns the state of a server. You can pass an atom or pid.

initial_state(state)

Overridable:

Prepares, validates, formats the given state to be passed to init()

prepare_state_to_start(opts)

Overridable:

Should return the args passed to start_link. For a named server it extracts the :initial_state from the opts. For unnamed processes it takes opts as the initial state.

start_link(opts)

Start the server with either

MyServer.start_link(initial_state) ... start an unregistered server with the given 
                                       initial state.

MyServer.start_link(name: :registered_as_whatever, initial_state: any) ...
                                       start a registered server with `initial_state` as it's state.