#[non_exhaustive]pub enum ServiceProfile {
UpdateTracker,
Agent,
Scheduler,
Unknown,
}Expand description
Behavioral profile derived from a service’s capability set.
| Profile | Key capability | Services |
|---|---|---|
UpdateTracker | Capability::UpdateTracking | MQTT service |
Agent | Capability::SoftwareDiscovery | Local agent, SSH agent |
Scheduler | Capability::Scheduler | External task scheduler |
Unknown is the fallback for unrecognized capability combinations.
ServiceProfile is never persisted — it is always derived from capabilities.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UpdateTracker
Update-tracking service (has UpdateTracking capability).
Agent
Agent service — local or SSH-backed (has SoftwareDiscovery capability).
Scheduler
External task scheduler service (has Scheduler capability).
Unknown
Unrecognized capability combination.
Implementations§
Source§impl ServiceProfile
impl ServiceProfile
Sourcepub fn from_capabilities(caps: &BTreeSet<Capability>) -> Self
pub fn from_capabilities(caps: &BTreeSet<Capability>) -> Self
Derive the behavioral profile from a capability set.
Precedence: UpdateTracker > Scheduler > Agent > Unknown.
Sourcepub const fn default_ping_interval_secs(&self) -> u32
pub const fn default_ping_interval_secs(&self) -> u32
Default ping interval in seconds for this profile.
UpdateTracker: 15 seconds (MQTT lease heartbeat).Scheduler: 60 seconds (less latency-sensitive).Agent/Unknown: 300 seconds (5 minutes).
Sourcepub const fn shutdown_timeout_secs(&self) -> Option<u32>
pub const fn shutdown_timeout_secs(&self) -> Option<u32>
Shutdown timeout in seconds, if applicable.
UpdateTracker:None(no graceful shutdown timeout).Scheduler:Some(30)(allow claim release).Agent/Unknown:Some(120)(2 minutes).
Sourcepub const fn service_label(&self, has_ssh_remote: bool) -> &'static str
pub const fn service_label(&self, has_ssh_remote: bool) -> &'static str
Human-readable label for display in the API and UI.
For Agent profiles, pass has_ssh_remote = true to distinguish
SSH-backed agents from local agents.
Trait Implementations§
Source§impl Clone for ServiceProfile
impl Clone for ServiceProfile
Source§fn clone(&self) -> ServiceProfile
fn clone(&self) -> ServiceProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more