Skip to main content

DiscoveredSoftware

Struct DiscoveredSoftware 

Source
pub struct DiscoveredSoftware {
    pub package_identifier: String,
    pub name: String,
    pub installed_version: String,
    pub targets: Vec<DiscoveryTarget>,
    pub extra: Option<Value>,
    pub qualifier: Option<String>,
    pub plugin_package_identifier: Option<String>,
    pub featured: bool,
    pub installed_display_version: Option<String>,
}
Expand description

A piece of software discovered on the local system by a plugin.

installed_version is required — plugins that cannot determine a version must omit the item from results entirely.

This type is the canonical shared definition used in both the agent/plugin layer and the wire protocol. The uptrakit-plugin-core crate re-exports it.

§Discovery targets

The targets field drives plugin-config creation and role assignment on the controller. When non-empty, the controller processes each target generically (find-or-create plugin config, create role assignments). When empty, the controller falls back to the plugin_config_id on the enclosing DiscoveryPluginResult.

The extra field is purely informational metadata (e.g. Docker’s container names) — the controller never interprets it for config synthesis.

§Per-row qualifier

The qualifier field selects which host_software_item row to create or reuse. None = unqualified (default behaviour, one row per software item per host). Docker uses the container name here so that each container gets its own tracking row even when multiple containers run the same image.

§Plugin package identifier

plugin_package_identifier, when set, overrides package_identifier as the value stored in host_software_item_plugin.package_identifier for plugin operations. None = use package_identifier (existing behaviour).

§Pinning

When featured is true, the controller marks the software item as featured on first creation so it gets individual MQTT entities and prominent visibility. Default false — item starts unfeatured (bulk/aggregate view only). The controller only applies featured: true when creating a new software_items row. Subsequent discoveries do not override a user’s manual feature/unfeature choice.

Fields§

§package_identifier: String

Plugin-specific identifier for this software (e.g., package name, app slug).

§name: String

Human-readable display name.

§installed_version: String

Currently installed version (required; plugins omit items with unknown versions).

§targets: Vec<DiscoveryTarget>

Target plugin configurations for managing this item.

Empty = use the discovering plugin’s own config for all roles.

§extra: Option<Value>

Optional informational metadata (not used for config synthesis).

Example: Docker’s {"containers": ["web-server"]}.

§qualifier: Option<String>

Row discriminator within host_software_items.

None = unqualified (default). Docker sets this to the container name so that each container produces its own host_software_item row even when multiple containers run the same image.

§plugin_package_identifier: Option<String>

Override for the package_identifier stored in host_software_item_plugin.package_identifier.

None = use package_identifier (existing behaviour).

§featured: bool

When true, the controller marks the software item as featured on first creation. Default false — item starts unfeatured.

§installed_display_version: Option<String>

Plugin-provided display version for the installed version (e.g. Docker image publish date). None when the plugin cannot determine a display version during discovery.

Trait Implementations§

Source§

impl Clone for DiscoveredSoftware

Source§

fn clone(&self) -> DiscoveredSoftware

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 DiscoveredSoftware

Source§

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

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

impl<'de> Deserialize<'de> for DiscoveredSoftware

Source§

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

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

impl Eq for DiscoveredSoftware

Source§

impl PartialEq for DiscoveredSoftware

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DiscoveredSoftware

Source§

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

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

impl StructuralPartialEq for DiscoveredSoftware

Source§

impl WireValidate for DiscoveredSoftware

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