Skip to main content

ServiceMessage

Enum ServiceMessage 

Source
#[non_exhaustive]
pub enum ServiceMessage {
Show 27 variants Ping(PingPayload), Enroll(EnrollPayload), RequestCertificate(RequestCertificatePayload), RenewCertificate(RenewCertificatePayload), Disconnecting(DisconnectingPayload), ReportHosts(ReportHostsPayload), VersionCheckResults(VersionCheckResultsPayload), UpdateStarted(UpdateStartedPayload), UpdateOutput(UpdateOutputPayload), UpdateResult(UpdateResultPayload), BatchUpdateResult(BatchUpdateResultPayload), DiscoveryResults(DiscoveryResultsPayload), StdinAttention(StdinAttentionPayload), ServiceTriggerUpdate(ServiceUpdateTriggerPayload), ServiceTriggerHostBatchUpdate(ServiceHostBatchUpdateTriggerPayload), Register(RegisterPayload), ReportPluginConfig(ReportPluginConfigPayload), SurfaceRegistration(SurfaceRegistration), SurfaceActionResponse(SurfaceActionResponse), SurfaceActionRequest(SurfaceActionRequest), StoreServiceConfig(StoreServiceConfigPayload), DeleteServiceConfig(DeleteServiceConfigPayload), WorkloadClaim(WorkloadClaimPayload), WorkloadRelease(WorkloadReleasePayload), TestPluginConfigResult(TestPluginConfigResultPayload), AuditEvent(AuditEventPayload), Unknown,
}
Expand description

Messages sent from a service (agent or MQTT) to the controller.

§Forward compatibility

The Unknown variant is a catch-all for message types introduced in newer service builds that an older controller does not yet recognise. When encountered, the controller logs a warning and continues without closing the connection, allowing rolling upgrades where services and controllers are not updated simultaneously.

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.
§

Ping(PingPayload)

§

Enroll(EnrollPayload)

§

RequestCertificate(RequestCertificatePayload)

§

RenewCertificate(RenewCertificatePayload)

§

Disconnecting(DisconnectingPayload)

§

ReportHosts(ReportHostsPayload)

§

VersionCheckResults(VersionCheckResultsPayload)

§

UpdateStarted(UpdateStartedPayload)

§

UpdateOutput(UpdateOutputPayload)

§

UpdateResult(UpdateResultPayload)

§

BatchUpdateResult(BatchUpdateResultPayload)

§

DiscoveryResults(DiscoveryResultsPayload)

§

StdinAttention(StdinAttentionPayload)

Agent → Controller: the update process appears to be waiting for stdin input.

Sent when the agent detects that the process has produced no output for a sustained period while still running (heuristic: ~10 seconds of silence). The controller broadcasts this to interactive session subscribers and may trigger notifications.

§

ServiceTriggerUpdate(ServiceUpdateTriggerPayload)

§

ServiceTriggerHostBatchUpdate(ServiceHostBatchUpdateTriggerPayload)

Service → Controller: trigger a batch update of all outdated software items on a host.

Sent when a Home Assistant user presses “Install” on a host update entity.

§

Register(RegisterPayload)

Service declares its capabilities immediately on connect.

Sent from on_connected before ServiceSettings is processed. The controller uses this to establish session-level capability flags without relying on DB-stored values (which may be absent on first connect).

§

ReportPluginConfig(ReportPluginConfigPayload)

Service reports a plugin configuration to the controller.

Sent by agents that detect infrastructure (e.g. PVE nodes) during bootstrap. The controller creates or returns an existing plugin config matching (tenant_id, plugin_type, name) and responds with ReportPluginConfigResponse.

§

SurfaceRegistration(SurfaceRegistration)

Service declares its surfaces after connecting.

Sent once after connection setup by services that participate in the surface contract.

§

SurfaceActionResponse(SurfaceActionResponse)

Response to a proxied surface action invocation.

Sent by the service after processing a SurfaceActionRequest from the controller.

§

SurfaceActionRequest(SurfaceActionRequest)

Service requests a surface action invocation from the controller.

Enables services to call surface actions via the wire protocol and receive the correlated ControllerMessage::SurfaceActionResponse.

§

StoreServiceConfig(StoreServiceConfigPayload)

Service → Controller: upsert a config entry in the controller DB.

The controller encrypts sensitive values at rest, ACKs, and broadcasts ServiceConfigUpdated to all connected instances of the same service app.

§

DeleteServiceConfig(DeleteServiceConfigPayload)

Service → Controller: delete a config entry from the controller DB.

The controller deletes, ACKs, and broadcasts ServiceConfigUpdated.

§

WorkloadClaim(WorkloadClaimPayload)

Service → Controller: request exclusive ownership of config keys.

Sent after ServiceConfigDelivery is processed and whenever the desired config set changes. Uses full replacement semantics. Requires the WorkloadClaims capability.

§

WorkloadRelease(WorkloadReleasePayload)

Service → Controller: voluntarily release config keys.

Sent when a service no longer wants to serve certain configs. Requires the WorkloadClaims capability.

§

TestPluginConfigResult(TestPluginConfigResultPayload)

Agent -> Controller: result of a plugin configuration test.

Sent after the agent completes a config test request. The controller uses request_id to correlate with the pending REST API request.

§

AuditEvent(AuditEventPayload)

Service -> Controller: forwarded semantic audit event.

The controller re-validates the event and silently drops invalid or non-forwardable payloads without closing the connection.

§

Unknown

Unknown message type from a newer service build.

Deserialized when the type tag does not match any known variant. The payload is discarded. The receiver should log a warning and continue processing other messages.

Trait Implementations§

Source§

impl Clone for ServiceMessage

Source§

fn clone(&self) -> ServiceMessage

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 ServiceMessage

Source§

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

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

impl<'de> Deserialize<'de> for ServiceMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

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

impl Eq for ServiceMessage

Source§

impl PartialEq for ServiceMessage

Source§

fn eq(&self, other: &ServiceMessage) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ServiceMessage

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ServiceMessage

Source§

impl WireValidate for ServiceMessage

Source§

fn wire_validate(&self) -> Result<(), WireValidationError>

Validate that all fields are within wire protocol size limits.

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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