#[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
HostUpdated
A host’s metadata was updated.
HostCreated
A new host was created (e.g. reported by an agent).
HostDeleted
A host was deactivated / deleted.
ServiceStatusChanged
A service’s status changed (approved, rejected, deactivated).
SoftwareItemUpdated
A software item was updated.
SoftwareItemCreated
A new software item was created.
VersionCheckCompleted
A version check completed for a host + software item pair.
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
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.
UpdateStarted
A software update started executing.
Fields
UpdateCompleted
A software update completed (successfully or with failure).
DiscoveryCompleted
Autodiscovery completed for a host.
SystemServiceStatusChanged
A system service’s status changed (approved, rejected, deactivated).
SchedulerTaskCompleted
A scheduled task completed execution.
HostTagCreated
A host tag was created.
HostTagUpdated
A host tag was updated.
HostTagDeleted
A host tag was deleted.
HostTagsChanged
Tag assignments changed on a host.
GlobalGitHubProviderMisconfigured
The global GitHub provider settings are stored in an invalid state.
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
impl AdminEvent
Sourcepub fn event_name(&self) -> &str
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
impl Clone for AdminEvent
Source§fn clone(&self) -> AdminEvent
fn clone(&self) -> AdminEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdminEvent
impl Debug for AdminEvent
Source§impl<'de> Deserialize<'de> for AdminEvent
impl<'de> Deserialize<'de> for AdminEvent
Source§fn deserialize<D>(
deserializer: D,
) -> Result<AdminEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<AdminEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for AdminEvent
impl Serialize for AdminEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for AdminEvent
impl RefUnwindSafe for AdminEvent
impl Send for AdminEvent
impl Sync for AdminEvent
impl Unpin for AdminEvent
impl UnsafeUnpin for AdminEvent
impl UnwindSafe for AdminEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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