analyzer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package analyzer provides the main image analysis orchestration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeImage

func AnalyzeImage(ctx context.Context, imageRef string) (*models.AnalysisResult, error)

AnalyzeImage is a convenience function for simple analysis.

func AnalyzeWithSuggestions

func AnalyzeWithSuggestions(ctx context.Context, imageRef string) (*models.AnalysisResult, error)

AnalyzeWithSuggestions analyzes an image and includes optimization suggestions.

func EnsureImageAvailable

func EnsureImageAvailable(ctx context.Context, client docker.Client, imageRef string) error

EnsureImageAvailable checks if an image exists and pulls it if needed.

Types

type AnalysisOptions

type AnalysisOptions struct {
	IncludeSuggestions bool
	TopLayers          int
}

AnalysisOptions contains options for the analysis.

func DefaultAnalysisOptions

func DefaultAnalysisOptions() AnalysisOptions

DefaultAnalysisOptions returns the default analysis options.

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer orchestrates the image analysis process.

func NewAnalyzer

func NewAnalyzer(client docker.Client) *Analyzer

NewAnalyzer creates a new analyzer with the given Docker client.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, imageRef string, opts AnalysisOptions) (*models.AnalysisResult, error)

Analyze performs a complete analysis of the specified image.

Jump to

Keyboard shortcuts

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