distribute/cluster/monitor

Types

pub type ClusterEvent {
  NodeUp(node: String)
  NodeDown(node: String)
}

Constructors

  • NodeUp(node: String)
  • NodeDown(node: String)
pub type ControlMessage {
  Stop
  InternalEvent(ClusterEvent)
}

Constructors

Values

pub fn subscribe(
  user_subject: process.Subject(ClusterEvent),
) -> Result(process.Subject(ControlMessage), actor.StartError)

Subscribe to cluster topology events. Events are forwarded to the provided user_subject. Returns a control subject to stop the subscription.

pub fn unsubscribe(
  monitor_subject: process.Subject(ControlMessage),
) -> Nil

Stop the monitoring for a specific subscription.

Search Document