View Source cets_dist_blocker (cets v0.2.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.Link to this section Summary
Link to this section Types
-type cleaner_pid() :: pid().
-type state() :: #{cleaners := [cleaner_pid()], waiting := waiting()}.
-type waiting() :: [{node(), cleaner_pid()}].
Link to this section Functions
-spec add_cleaner(pid()) -> ok.
-spec cleaning_done(pid(), node()) -> ok.
Confirm that cleaning is done.
This function should be called by a cleaner when it receives nodedown and finishes cleaning.dist_blocker