softwareinventoryimpl

package
v0.0.0-...-63ce7f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package softwareinventoryimpl contains the implementation of the inventory software component. This package provides the concrete implementation of the inventory software component that collects software inventory data from the Windows system through the System Probe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostSoftware

type HostSoftware struct {
	// Software is a list of software entries representing all installed applications
	// found on the host system. Each entry contains detailed information about
	// a specific software installation, including name, version, installation date,
	// publisher, and other relevant metadata.
	Software []software.Entry `json:"software"`
}

HostSoftware represents the software inventory data for a single host. This structure contains the list of all software entries found on the host system, providing a comprehensive view of installed applications and their metadata.

type Payload

type Payload struct {
	// Hostname is the name of the host system where the software inventory was collected.
	// This field helps identify which system the inventory data belongs to.
	Hostname string `json:"hostname"`

	// Metadata contains the actual software inventory data collected from the host system.
	// This includes detailed information about each installed software application.
	Metadata HostSoftware `json:"host_software"`
}

Payload represents the complete software inventory payload sent to the Datadog backend. This structure contains all the metadata about software installed on the host system, including the hostname, timestamp of collection, and the actual software inventory data.

func (*Payload) MarshalJSON

func (p *Payload) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling for the Payload type. This method ensures proper JSON serialization while avoiding infinite recursion that could occur with the default Go JSON marshaling due to the embedded types.

func (*Payload) SplitPayload

func (p *Payload) SplitPayload(_ int) ([]marshaler.AbstractMarshaler, error)

SplitPayload implements marshaler.AbstractMarshaler#SplitPayload. This method is called when the payload needs to be split into smaller chunks for transmission. In the case of software inventory, the payload cannot be split further as it represents a complete inventory snapshot that should be transmitted as a single unit to maintain data integrity.

type Provides

type Provides struct {
	// Comp is the main component interface for software inventory
	Comp softwareinventory.Component
	// FlareProvider provides software inventory data for flare collection
	FlareProvider flaretypes.Provider
	// StatusHeaderProvider provides status information for the agent status page
	StatusHeaderProvider status.HeaderInformationProvider
	// Endpoint provides HTTP endpoint access to software inventory data
	Endpoint api.AgentEndpointProvider
}

Provides defines the output of the inventory software component. This struct defines all the services and providers that the component makes available to the rest of the system.

func New

func New(reqs Requires) (Provides, error)

New creates a new inventory software component with the default sysprobeclient

type Requires

type Requires struct {
	// Log provides logging capabilities for the component
	Log log.Component
	// Config provides access to the agent configuration
	Config config.Component
	// SysprobeConfig provides access to the system probe configuration
	SysprobeConfig sysprobeconfig.Component
	// Serializer is used to serialize and send data to the backend
	Serializer serializer.MetricSerializer
	// Hostname provides the hostname of the current system
	Hostname hostnameinterface.Component
	// EventPlatform provides access to the event platform forwarder
	EventPlatform eventplatform.Component
	// Provides lifecycle hooks for the component
	Lc compdef.Lifecycle
}

Requires defines the dependencies required by the inventory software component. This struct defines all the required dependencies that must be provided when creating a new inventory software component instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL