#[non_exhaustive]pub struct ServiceSettingsPayload {
pub renewal_window_hours: u16,
pub ca_bundle_hash: String,
pub capabilities: BTreeSet<Capability>,
pub report_page_limits: ReportPageLimits,
pub shutdown_timeout: Option<Duration>,
pub ping_interval: Duration,
pub tenant_id: Option<Uuid>,
pub trust_domain: String,
}Expand description
Payload for service runtime settings pushed by the controller.
Used for both agents and MQTT services. shutdown_timeout is
present for agents and None for MQTT services.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.renewal_window_hours: u16§ca_bundle_hash: String§capabilities: BTreeSet<Capability>Capabilities advertised by the controller.
The service computes the agreed set as the intersection of this set with its own capabilities, considering only typed (known) variants.
report_page_limits: ReportPageLimitsPer-page item-count limits for paginated service-to-controller reports.
Services must honor these limits when splitting large report_hosts,
discovery_results, version_check_results, and
batch_update_result payloads across pages.
shutdown_timeout: Option<Duration>Maximum time to wait for in-flight operations during shutdown. Present for agents, absent for MQTT services.
Wire field name: shutdown_timeout_seconds (kept for backward compatibility).
ping_interval: DurationHow often the service should send ping messages. Controller-managed; derived from per-service DB override or service-type default.
tenant_id: Option<Uuid>Tenant UUID that this service belongs to.
None for system services (MQTT, scheduler) which are not
tenant-scoped. Present for tenant-scoped agents so they can
include the tenant identity in external provisioning operations
(e.g. PVE API credential naming).
trust_domain: StringSPIFFE trust domain for Service identity URIs.
Empty string when the Controller has no trust domain configured. Agent falls back to the dialed hostname for SPIFFE SAN generation.
Implementations§
Source§impl ServiceSettingsPayload
impl ServiceSettingsPayload
Sourcepub fn new(renewal_window_hours: u16, ping_interval: Duration) -> Self
pub fn new(renewal_window_hours: u16, ping_interval: Duration) -> Self
Creates a new ServiceSettingsPayload with the required fields.
Optional fields default to: ca_bundle_hash = empty, capabilities = empty,
report_page_limits = default, shutdown_timeout = None,
tenant_id = None, trust_domain = empty.
Sourcepub fn with_ca_bundle_hash(self, ca_bundle_hash: String) -> Self
pub fn with_ca_bundle_hash(self, ca_bundle_hash: String) -> Self
Sets the CA bundle hash.
Sourcepub fn with_capabilities(
self,
capabilities: impl IntoIterator<Item = Capability>,
) -> Self
pub fn with_capabilities( self, capabilities: impl IntoIterator<Item = Capability>, ) -> Self
Sets the controller capability set.
Sourcepub fn with_report_page_limits(
self,
report_page_limits: ReportPageLimits,
) -> Self
pub fn with_report_page_limits( self, report_page_limits: ReportPageLimits, ) -> Self
Sets the report page limits.
Sourcepub fn with_shutdown_timeout(self, shutdown_timeout: Duration) -> Self
pub fn with_shutdown_timeout(self, shutdown_timeout: Duration) -> Self
Sets the graceful-shutdown timeout for agent services.
Sourcepub fn with_tenant_id(self, tenant_id: Uuid) -> Self
pub fn with_tenant_id(self, tenant_id: Uuid) -> Self
Sets the tenant UUID for tenant-scoped services.
Sourcepub fn with_trust_domain(self, trust_domain: String) -> Self
pub fn with_trust_domain(self, trust_domain: String) -> Self
Sets the SPIFFE trust domain advertised to connecting services.
Trait Implementations§
Source§impl Clone for ServiceSettingsPayload
impl Clone for ServiceSettingsPayload
Source§fn clone(&self) -> ServiceSettingsPayload
fn clone(&self) -> ServiceSettingsPayload
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 ServiceSettingsPayload
impl Debug for ServiceSettingsPayload
Source§impl<'de> Deserialize<'de> for ServiceSettingsPayload
impl<'de> Deserialize<'de> for ServiceSettingsPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ServiceSettingsPayload
Source§impl PartialEq for ServiceSettingsPayload
impl PartialEq for ServiceSettingsPayload
Source§impl Serialize for ServiceSettingsPayload
impl Serialize for ServiceSettingsPayload
impl StructuralPartialEq for ServiceSettingsPayload
Source§impl WireValidate for ServiceSettingsPayload
impl WireValidate for ServiceSettingsPayload
Source§fn wire_validate(&self) -> Result<(), WireValidationError>
fn wire_validate(&self) -> Result<(), WireValidationError>
Auto Trait Implementations§
impl Freeze for ServiceSettingsPayload
impl RefUnwindSafe for ServiceSettingsPayload
impl Send for ServiceSettingsPayload
impl Sync for ServiceSettingsPayload
impl Unpin for ServiceSettingsPayload
impl UnsafeUnpin for ServiceSettingsPayload
impl UnwindSafe for ServiceSettingsPayload
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.