aarondb/operations

operations — typed, honest distributed runtime status

Types

pub type Alarm {
  QuorumLost
  ProjectionFailed(projection.Failure)
  IndexUnavailable(projection_index.Health)
  UnsafeRecovery(identity.RecoveryAlarm)
}

Constructors

pub type QuorumHealth {
  Healthy
  Degraded
  Unavailable
}

Constructors

  • Healthy
  • Degraded
  • Unavailable
pub type Status {
  Status(
    leader: option.Option(String),
    commit_index: Int,
    replication_lag: Int,
    quorum: QuorumHealth,
    projection: projection.Status,
    index_health: projection_index.Health,
    lease_count: Int,
    alarms: List(Alarm),
  )
}

Constructors

Values

pub fn status(
  raft_state: raft_runtime.State,
  voter_count: Int,
  acknowledged: Int,
  follower_match_index: Int,
  projection_status: projection.Status,
  index: projection_index.Index,
  consensus_state: consensus.State,
  recovery: identity.RecoveryState,
) -> Status
Search Document