View Source cets_dist_blocker (cets v0.3.0)
Disallow distributed erlang connections until cleaning is done.
This module prevents a node from reconnecting, until cleaning activity is finished. It prevents race conditions.
This module assumes all nodes share the same cookie.
Summary
Types
-type cleaner_pid() :: pid().
-type state() :: #{cleaners := [cleaner_pid()], waiting := waiting()}.
-type waiting() :: [{node(), cleaner_pid()}].
Functions
-spec add_cleaner(pid()) -> ok.
Register CleanerPid as a cleaner.
Confirm that cleaning is done.
This function should be called by a cleaner when it receives nodedown and finishes cleaning.
Spawn dist_blocker