Skip to main content

AdminEvent

Enum AdminEvent 

Source
#[non_exhaustive]
pub enum AdminEvent {
Show 22 variants HostUpdated { id: Uuid, }, HostCreated { id: Uuid, }, HostDeleted { id: Uuid, }, ServiceStatusChanged { id: Uuid, status: String, }, SoftwareItemUpdated { id: Uuid, }, SoftwareItemCreated { id: Uuid, }, VersionCheckCompleted { host_id: Uuid, software_item_id: Uuid, }, UpdateTriggered { update_history_id: Uuid, host_id: Uuid, software_item_id: Uuid, status: String, }, UpdateProtectionStarted { update_history_id: Uuid, host_id: Uuid, software_item_id: Uuid, }, UpdateStarted { update_history_id: Uuid, host_id: Uuid, software_item_id: Uuid, interactive: bool, }, UpdateCompleted { update_history_id: Uuid, host_id: Uuid, software_item_id: Uuid, status: String, }, DiscoveryCompleted { host_id: Uuid, }, SystemServiceStatusChanged { id: Uuid, status: String, }, SchedulerTaskCompleted { task_id: Uuid, }, HostTagCreated { id: Uuid, }, HostTagUpdated { id: Uuid, }, HostTagDeleted { id: Uuid, }, HostTagsChanged { host_id: Uuid, }, GlobalGitHubProviderMisconfigured { problem: String, }, DataReset, SurfacesChanged, Other(String),
}
Expand description

A real-time event pushed to admin SSE subscribers.

Each variant represents a state change that the frontend can use to invalidate and refresh the relevant data. Events are lightweight invalidation signals — they carry only enough context (entity IDs, status strings) for the subscriber to decide whether to refetch.

§Wire format

Sent as SSE with event: set to event_name() and data: set to the JSON-serialised inner fields of the variant.

§Wire forward-compatibility

Other(String) is a catch-all for event type strings received from a newer server that this client does not yet recognise. Serde deserialization is infallible: an unknown variant becomes Other(variant_name) rather than a parse error, allowing older consumers to survive rolling upgrades without failing.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

HostUpdated

A host’s metadata was updated.

Fields

§id: Uuid
§

HostCreated

A new host was created (e.g. reported by an agent).

Fields

§id: Uuid
§

HostDeleted

A host was deactivated / deleted.

Fields

§id: Uuid
§

ServiceStatusChanged

A service’s status changed (approved, rejected, deactivated).

Fields

§id: Uuid
§status: String
§

SoftwareItemUpdated

A software item was updated.

Fields

§id: Uuid
§

SoftwareItemCreated

A new software item was created.

Fields

§id: Uuid
§

VersionCheckCompleted

A version check completed for a host + software item pair.

Fields

§host_id: Uuid
§software_item_id: Uuid
§

UpdateTriggered

A software update was created and dispatched to the agent.

Emitted immediately after trigger_update_for_host succeeds, before the agent confirms start. Allows the History page to show the new pending/queued entry in real-time without polling.

Fields

§update_history_id: Uuid
§host_id: Uuid
§software_item_id: Uuid
§status: String

Trigger status: “pending” (agent connected) or “queued” (agent offline).

§

UpdateProtectionStarted

Controller pre-update protection started for a software update.

Emitted by the orchestrator when protection (snapshot/backup) begins. The frontend transitions the update record to In Progress state on receipt.

Fields

§update_history_id: Uuid
§host_id: Uuid
§software_item_id: Uuid
§

UpdateStarted

A software update started executing.

Fields

§update_history_id: Uuid
§host_id: Uuid
§software_item_id: Uuid
§interactive: bool

Whether the update was dispatched in interactive mode (PTY allocation intended; input unlocks in the UI once the PTY is live).

Allows the history list to show an “Input Required” badge in real-time without reloading, as soon as the update transitions to in_progress.

§

UpdateCompleted

A software update completed (successfully or with failure).

Fields

§update_history_id: Uuid
§host_id: Uuid
§software_item_id: Uuid
§status: String
§

DiscoveryCompleted

Autodiscovery completed for a host.

Fields

§host_id: Uuid
§

SystemServiceStatusChanged

A system service’s status changed (approved, rejected, deactivated).

Fields

§id: Uuid
§status: String
§

SchedulerTaskCompleted

A scheduled task completed execution.

Fields

§task_id: Uuid
§

HostTagCreated

A host tag was created.

Fields

§id: Uuid
§

HostTagUpdated

A host tag was updated.

Fields

§id: Uuid
§

HostTagDeleted

A host tag was deleted.

Fields

§id: Uuid
§

HostTagsChanged

Tag assignments changed on a host.

Fields

§host_id: Uuid
§

GlobalGitHubProviderMisconfigured

The global GitHub provider settings are stored in an invalid state.

Fields

§problem: String
§

DataReset

All tenant data was reset (hosts, software items, etc. deleted).

§

SurfacesChanged

The surface provider registry changed (provider joined or left).

Carries no payload — coarse invalidation signal. The frontend re-fetches GET /api/v1/surfaces and provider availability on receipt.

§

Other(String)

An unknown event variant received from a newer peer.

The inner string is the raw variant name as it appeared on the wire. Deserialization is infallible — unknown variants are captured here rather than causing a parse error, so older consumers survive rolling upgrades.

Implementations§

Source§

impl AdminEvent

Source

pub fn event_name(&self) -> &str

Returns the SSE event: field name for this variant.

The name is the snake_case version of the variant name, matching the serde rename_all = "snake_case" serialisation. For Other, returns the raw variant string as received on the wire.

Trait Implementations§

Source§

impl Clone for AdminEvent

Source§

fn clone(&self) -> AdminEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AdminEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AdminEvent

Source§

fn deserialize<D>( deserializer: D, ) -> Result<AdminEvent, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AdminEvent

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<O> ObjectMarkerFor<Local> for O
where O: 'static,

Source§

impl<O> ObjectMarkerFor<SendSync> for O
where O: 'static + Send + Sync,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more