collectors

package
v0.9.1-0...-cefb01c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package collectors holds collectors related files

Index

Constants

View Source
const (
	// ContainerImageScanType defines the container image scan type
	ContainerImageScanType ScanType = "container-image"
	// HostScanType defines the host scan type
	HostScanType ScanType = "host"
	// ContainerdCollector is the name of the containerd collector
	ContainerdCollector = "containerd"
	// CrioCollector is the name of the containerd collector
	CrioCollector = "crio"
	// DockerCollector is the name of the docker collector
	DockerCollector = "docker"
	// HostCollector is the name of the host collector
	HostCollector = "host"
)

Variables

View Source
var Collectors map[string]Collector

Collectors values

Functions

func RegisterCollector

func RegisterCollector(name string, collector Collector)

RegisterCollector registers given collector

Types

type Collector

type Collector interface {
	// Type returns the scan type of the collector
	Type() ScanType
	// CleanCache cleans the collector cache
	CleanCache() error
	// Init initializes the collector
	Init(config.Component, optional.Option[workloadmeta.Component]) error
	// Scan performs a scan
	Scan(context.Context, sbom.ScanRequest) sbom.ScanResult
	// Channel returns the channel to send scan results
	Channel() chan sbom.ScanResult
	// Options returns the collector options
	Options() sbom.ScanOptions
	// Shutdown shuts down the collector
	Shutdown()
}

Collector interface

func GetContainerdScanner

func GetContainerdScanner() Collector

GetContainerdScanner returns the containerd scanner

func GetCrioScanner

func GetCrioScanner() Collector

GetCrioScanner returns the crio scanner

func GetDockerScanner

func GetDockerScanner() Collector

GetDockerScanner returns the docker scanner

func GetHostScanner

func GetHostScanner() Collector

GetHostScanner returns the host scanner

type ScanType

type ScanType string

ScanType defines the scan type of the collector

Directories

Path Synopsis
Package crio holds crio related files
Package crio holds crio related files
Package docker holds docker related files
Package docker holds docker related files
Package host holds host related files
Package host holds host related files

Jump to

Keyboard shortcuts

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