cets_dist_blocker (cets v0.3.1)

View Source

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

Functions

add_cleaner(CleanerPid)

-spec add_cleaner(pid()) -> ok.

Register CleanerPid as a cleaner.

cleaning_done(CleanerPid, Node)

-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.

code_change(OldVsn, State, Extra)

handle_call(Request, From, State)

handle_cast(Msg, State)

handle_info(Info, State)

init(_)

start_link()

Spawn dist_blocker

terminate(Reason, State)