4.1.31 on_peer_liveness_change(Hook, Prio)

-spec on_peer_liveness_change(fun((_Remote ::
                                       site(),
                                   _IsAlive ::
                                       boolean()) -> _),
                              classy_hook:conf()) -> classy_hook:hook().

Register a hook that is executed when a site changes status for up to down or vice versa.

Note: this hook is different from classy:on_peer_connection_change/2, as care is taken to avoid firing it during a network partition.

The decision to consider a peer down comes either from the peer itself when it shuts down gracefully or from the quorum of other running peers.

See node_hook_execution.

JavaScript license information