#[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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ServiceProfile
Source§impl Debug for ServiceProfile
impl Debug for ServiceProfile
impl Eq for ServiceProfile
Source§impl PartialEq for ServiceProfile
impl PartialEq for ServiceProfile
impl StructuralPartialEq for ServiceProfile
Auto Trait Implementations§
impl Freeze for ServiceProfile
impl RefUnwindSafe for ServiceProfile
impl Send for ServiceProfile
impl Sync for ServiceProfile
impl Unpin for ServiceProfile
impl UnsafeUnpin for ServiceProfile
impl UnwindSafe for ServiceProfile
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,
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.