RaRegistry.StateMachine (ra_registry v0.1.2)

View Source

The Ra state machine implementation for the distributed registry.

Summary

Functions

Apply commands to the state machine.

Handle process monitors.

Initialize the state machine with empty registry maps.

Query functions for Ra's consistent_query. These must follow the proper format of receiving machine state as a single argument.

Returns the Ra state machine configuration.

Functions

apply(meta, cmd, state)

command_handler(meta, arg, state)

Apply commands to the state machine.

handle_down(pid, reason, state)

Handle process monitors.

init(state)

Initialize the state machine with empty registry maps.

lookup_query_duplicate(key, machine_state)

lookup_query_unique(key, machine_state)

Query functions for Ra's consistent_query. These must follow the proper format of receiving machine state as a single argument.

machine_config()

Returns the Ra state machine configuration.