Skip to content
Strata is pre-1.0. APIs, protocol, and storage format may change.

strata_server/admin_status

Read-only admin status snapshot encoding.

Document row exposed in the read-only admin UI.

pub type AdminDocument {
AdminDocument(id: String, byte_size: Int, last_write_ms: Int, socket_count: Int, presences: List(AdminPresence))
}

Presence fields exposed in the read-only admin UI.

pub type AdminPresence {
AdminPresence(session_id: String, name: String, color: String)
}

Full admin status snapshot.

pub type AdminStatus {
AdminStatus(generated_at_ms: Int, documents: List(AdminDocument))
}

Encode an admin status snapshot as JSON for the admin:status topic.

pub fn encode(AdminStatus) -> json.Json

Include bounded store observations without changing the legacy status shape.

pub fn encode_with_observations(
AdminStatus,
observations.Observations
) -> json.Json

Build a deterministic admin status snapshot from server state parts.

pub fn from_parts(
generated_at_ms: Int,
summaries: List(store.DocumentSummary),
socket_counts: List(#(String, Int)),
presences: List(#(String, List(AdminPresence)))
) -> AdminStatus