Concord.Sync.Dispatcher (Concord v2.0.0)

Copy Markdown View Source

Receives change events from the Raft state machine via Ra :send_msg effects and forwards them to the Watch Hub and Change Log.

Only the leader node emits :send_msg effects, so the Dispatcher only processes events on the current leader. On follower nodes, it idles.

Summary

Functions

Returns a specification to start this module under a supervisor.

Dispatch events directly (called from state machine or tests).

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

dispatch(events)

@spec dispatch([Concord.Sync.Event.t()]) :: :ok

Dispatch events directly (called from state machine or tests).

start_link(opts \\ [])