standalone

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package standalone provides a way to extract in a standalone mode (e.g. a command).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, config *Config) ([]*extractor.Inventory, []*plugin.Status, error)

Run the extractors that are specified in the config.

Types

type Config

type Config struct {
	Extractors []Extractor
	ScanRoot   *scalibrfs.ScanRoot
}

Config for running standalone extractors.

type Extractor

type Extractor interface {
	extractor.Extractor
	// Extract the information.
	Extract(ctx context.Context, input *ScanInput) ([]*extractor.Inventory, error)
}

Extractor is an interface for plugins that extract information independently. For example, a plugin that executes a command or retrieves information from only one file.

type ScanInput

type ScanInput struct {
	// FS for file access. This is rooted at Root.
	FS scalibrfs.FS
	// The root directory to start the extraction from.
	Root string
}

ScanInput provides information for the extractor about the scan.

Directories

Path Synopsis
containers
containerd
Package containerd extracts container inventory from containerd API.
Package containerd extracts container inventory from containerd API.
containerd/fakeclient
Package fakeclient contains a fake implementation of the containerd client for testing purposes.
Package fakeclient contains a fake implementation of the containerd client for testing purposes.
Package list contains the list of all standalone extractors.
Package list contains the list of all standalone extractors.
windows
common/metadata
Package metadata provides metadata structures to annotate Windows inventories.
Package metadata provides metadata structures to annotate Windows inventories.
common/winproducts
Package winproducts contains information about Windows products.
Package winproducts contains information about Windows products.
dismpatch/dismparser
Package dismparser has methods that can be used to parse DISM output
Package dismparser has methods that can be used to parse DISM output

Jump to

Keyboard shortcuts

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