inventory

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package inventory exports read-only observed dependency facts for external scanners. It never resolves packages or changes Kubernetes workloads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Pod             ObjectIdentity       `json:"pod"`
	Workload        ObjectIdentity       `json:"workload"`
	NodeName        string               `json:"nodeName"`
	Name            string               `json:"name"`
	ContainerID     string               `json:"containerID"`
	ObservedImageID string               `json:"observedImageID"`
	Status          string               `json:"status"`
	Reason          string               `json:"reason,omitempty"`
	Binding         *node.RuntimeBinding `json:"binding,omitempty"`
	EvidenceKey     string               `json:"evidenceKey,omitempty"`
}

type ObjectIdentity

type ObjectIdentity struct {
	Kind      string    `json:"kind"`
	Namespace string    `json:"namespace"`
	Name      string    `json:"name"`
	UID       types.UID `json:"uid"`
}

type Options

type Options struct {
	Cluster    string
	Namespaces []string
	Workloads  []string
	MaxAge     time.Duration
	ReadImage  func(context.Context, node.ApplicationIdentity) (artifact.DependencyReport, error)
}

type Report

type Report struct {
	SchemaVersion int                                  `json:"schemaVersion"`
	Cluster       string                               `json:"cluster"`
	StartedAt     time.Time                            `json:"startedAt"`
	FinishedAt    time.Time                            `json:"finishedAt"`
	Namespaces    []string                             `json:"namespaces"`
	Workloads     []string                             `json:"workloads,omitempty"`
	Complete      bool                                 `json:"complete"`
	Containers    []Container                          `json:"containers"`
	Artifacts     map[string]artifact.DependencyReport `json:"artifacts"`
	Warnings      []string                             `json:"warnings"`
}

func Capture

func Capture(ctx context.Context, reader client.Reader, options Options) (Report, error)

Jump to

Keyboard shortcuts

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