distribute/cluster/membership

Types

pub type Status {
  Alive
  Suspect
  Dead
}

Constructors

  • Alive
  • Suspect
  • Dead

Values

pub fn alive() -> List(String)

Get a list of all nodes currently considered ‘alive’.

pub fn current_leader() -> Result(String, Nil)
pub fn members_with_status() -> List(#(String, Status, Int))

Return the list of nodes and their status and incarnation according to the background poller. Returns a list of tuples #(NodeName, Status, Incarnation).

pub fn metrics() -> List(#(String, Int))

Return internal metrics as a list of (name, value) tuples.

pub fn metrics_get(name: String) -> Int
pub fn metrics_inc(name: String) -> Nil

Increment a named metric (useful in tests).

pub fn start_service(interval_ms: Int) -> Nil

Start the background membership poller with interval in milliseconds.

pub fn stop_service() -> Nil

Stop the background membership service.

pub fn suspect() -> List(String)

Get a list of all nodes currently considered ‘suspect’ (potentially failing).

Search Document