View Source ProcessHub.Service.Synchronizer (ProcessHub v0.5.0-beta)
The synchronizer service provides API functions for synchronizing process registry data between nodes.
Summary
Functions
Appends remote data to the local process registry.
Broadcasts local registry data to the specified target nodes.
Detaches remote data from the local process registry.
Returns local node's process registry data used for synchronization.
Helper function to trigger interval synchronization.
Functions
@spec append_data(ProcessHub.Hub.t(), %{ required(node()) => [ {ProcessHub.child_spec(), pid(), ProcessHub.child_metadata()} ] }) :: :ok
Appends remote data to the local process registry.
@spec broadcast_local_registry(ProcessHub.Hub.t(), [node()]) :: :ok
Broadcasts local registry data to the specified target nodes.
Called when new nodes join the cluster to share local process information.
@spec detach_data(ProcessHub.Hub.t(), %{ required(node()) => [{ProcessHub.child_spec(), pid()}] }) :: :ok
Detaches remote data from the local process registry.
@spec local_sync_data(ProcessHub.Hub.t()) :: [ {ProcessHub.child_spec(), pid(), ProcessHub.child_metadata()} ]
Returns local node's process registry data used for synchronization.
Helper function to trigger interval synchronization.
The system will use the configured synchronization strategy.