4.8.18 to_liveness(NRestarts, Self, IsUp)

-spec to_liveness(non_neg_integer(), boolean(),
                  boolean()) -> liveness().

Convert information about liveness to a sortable non-negative integer replicated via CRDT.

Arguments:

  1. Number of restarts of the target site
  2. true of the update is made by the site itself, false if the target site is updated by the 3rd party.
  3. true if the site is up.

Bits in the integer are organized such that:

  1. Liveness information for the higher number of restarts always wins.
  2. Liveness updates made by the 3rd party win. This way the target site knows that its peers decided that it went down.
JavaScript license information