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

strata_server/admin_channel

Read-only admin status channel.

An error that prevents the server from building an admin status snapshot.

pub type SnapshotError {
DocumentSummariesActorCallFailed(store.ActorCallError)
OperationalDataActorCallFailed(store.ActorCallError)
PresenceCountsActorCallFailed(store.ActorCallError)
DocumentPresenceReadFailed(document_id: String)
}

DocumentSummariesActorCallFailed(store.ActorCallError)

Section titled “DocumentSummariesActorCallFailed(store.ActorCallError)”

The document store did not return its summaries.

OperationalDataActorCallFailed(store.ActorCallError)

Section titled “OperationalDataActorCallFailed(store.ActorCallError)”

The store did not return its operational measurements.

PresenceCountsActorCallFailed(store.ActorCallError)

Section titled “PresenceCountsActorCallFailed(store.ActorCallError)”

The presence tracker did not return its socket counts.

DocumentPresenceReadFailed(document_id: String)

Section titled “DocumentPresenceReadFailed(document_id: String)”

The presence read model could not return entries for this document.

Supervised periodic collection; restarts with its store and channel handles.

pub fn broadcast_child_spec(
beryl.Sockets,
store.Store,
doc_presence.Tracker,
presence.Presence,
Int
) -> supervision.ChildSpecification(Nil)

Build the admin status channel handler for the admin:status topic. The join acknowledgment carries the current status snapshot.

pub fn handler(
store.Store,
doc_presence.Tracker,
presence.Presence
) -> channel.Handler

Build the current admin status snapshot as an encoded JSON payload.

pub fn snapshot(
store.Store,
doc_presence.Tracker,
presence.Presence
) -> Result(json.Json, SnapshotError)

Start periodic admin status broadcasts. Pass 0 or less to disable.

pub fn start_broadcast_loop(
beryl.Sockets,
store.Store,
doc_presence.Tracker,
presence.Presence,
Int
) -> Nil