View Source Chorex.RuntimeMonitor (Chorex v0.8.4)

GenServer that monitors all actors in a choreography and attempts to restart the system when something goes down.

Summary

Functions

Returns a specification to start this module under a supervisor.

Tell actor name at pid to recover with new network new_config.

Restore the actor that used to be at reference ref. Return the state with an updated network configuration.

Types

@type state() :: %{
  return_pid: pid(),
  supervisor: nil | pid(),
  session_token: nil | any(),
  actors: %{required(reference()) => {atom(), pid()}},
  state_store: %{required(atom()) => [Chorex.RuntimeState.t()]},
  sync_barrier: %{required(sync_token()) => %{required(atom()) => boolean()}},
  setup: %{required(atom()) => module()}
}
@type sync_token() :: String.t()
@type unwind_point() :: String.t()

Functions

Link to this function

begin_checkpoint(gs, sync_token)

View Source
Link to this function

checkpoint_state(gs, actor, state)

View Source

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

end_checkpoint(gs, actor, sync_token)

View Source
Link to this function

get_config_from_state(state)

View Source
Link to this function

recover(pid, new_config, state)

View Source

Tell actor name at pid to recover with new network new_config.

Called for effect; no meaningful return value.

Restore the actor that used to be at reference ref. Return the state with an updated network configuration.

Link to this function

start_child(gs, actor, module)

View Source
Link to this function

start_remote(gs, actor, spec)

View Source