baseimagematcher

package
v2.2.3 Latest Latest
Warning

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

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

Documentation

Overview

Package baseimagematcher implements a client for matching base images using the deps.dev API.

Index

Constants

View Source
const (
	APIEndpoint = "https://api.deps.dev/v3alpha/querycontainerimages/"
	// DigestSHA256EmptyTar is the canonical sha256 digest of empty tar file -
	// (1024 NULL bytes)
	DigestSHA256EmptyTar = digest.Digest("sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	MaxConcurrentBatchRequests int
	MaxRetryAttempts           int
	JitterMultiplier           float64
	BackoffDurationExponential float64
	BackoffDurationMultiplier  float64
	UserAgent                  string
}

func DefaultConfig

func DefaultConfig() ClientConfig

DefaultConfig make a default client config

type DepsDevBaseImageMatcher

type DepsDevBaseImageMatcher struct {
	HTTPClient http.Client
	Config     ClientConfig
}

DepsDevBaseImageMatcher is an implementation of clientinterfaces.BaseImageMatcher that uses the deps.dev API to match base images.

It sends out requests for every package version and does not perform caching.

func (*DepsDevBaseImageMatcher) MatchBaseImages

func (matcher *DepsDevBaseImageMatcher) MatchBaseImages(ctx context.Context, layerMetadata []models.LayerMetadata) ([][]models.BaseImageDetails, error)

Jump to

Keyboard shortcuts

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