View Source Cloister.Monitor.Fsm (cloister v0.17.3)

The instance of FSM backed up by Finitomata.

FSM representation

graph TD
    down --> |quorum!| assembling
    assembling --> |assembled| rehashing
    rehashing --> |nonode| nonode
    rehashing --> |rehash| rehashing
    rehashing --> |rehash| ready
    rehashing --> |stop!| stopping
    ready --> |nonode| nonode
    ready --> |rehash| ready
    ready --> |rehash| rehashing
    ready --> |stop!| stopping
    nonode --> |rehash!| assembling
    stopping --> |stop!| stopped

Summary

Types

Kind of event which might be send to initiate the transition.

Functions

Getter for the internal compiled in FSM information.

Returns a specification to start this module under a supervisor.

The convenient macro to allow using states in guards, returns a compile-time list of states for Cloister.Monitor.Fsm.

Starts an FSM alone with name and payload given.

Types

@type state() ::
  :stopped
  | :stopping
  | :ready
  | :nonode
  | :rehashing
  | :assembling
  | :down
  | :*

Kind of event which might be send to initiate the transition.

FSM representation

graph TD
    down --> |quorum!| assembling
    assembling --> |assembled| rehashing
    rehashing --> |nonode| nonode
    rehashing --> |rehash| rehashing
    rehashing --> |rehash| ready
    rehashing --> |stop!| stopping
    ready --> |nonode| nonode
    ready --> |rehash| ready
    ready --> |rehash| rehashing
    ready --> |stop!| stopping
    nonode --> |rehash!| assembling
    stopping --> |stop!| stopped

Functions

@spec __config__(atom()) :: any()

Getter for the internal compiled in FSM information.

Returns a specification to start this module under a supervisor.

See Supervisor.

The convenient macro to allow using states in guards, returns a compile-time list of states for Cloister.Monitor.Fsm.

Starts an FSM alone with name and payload given.

Usually one does not want to call this directly, the most common way would be to start a Finitomata supervision tree or even better embed it into the existing supervision tree and start FSM with Finitomata.start_fsm/3 passing Cloister.Monitor.Fsm as the first parameter.