worker

package
v0.0.0-...-875d95b Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageSource

type ImageSource interface {
	// GetImage returns the raw bytes of an image with the corresponding Digest.
	GetImage(ctx context.Context, digest types.Digest) ([]byte, error)
}

ImageSource is an abstraction around a way to load the images. If images are stored in GCS, or on a file system or wherever, they should be provided by this mechanism.

type WorkerImpl

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

func New

func New(db *pgxpool.Pool, src ImageSource, windowSize int) *WorkerImpl

New returns a diff worker which uses the provided ImageSource.

func (*WorkerImpl) CalculateDiffs

func (w *WorkerImpl) CalculateDiffs(ctx context.Context, grouping paramtools.Params, additional []types.Digest) error

CalculateDiffs calculates the diffs for the given grouping. It either computes all of the diffs if there are only "a few" digests, otherwise it computes a subset of them, taking into account recency and triage status.

Jump to

Keyboard shortcuts

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