prepare

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobTimeoutFromFleet

func JobTimeoutFromFleet(fleet *domain.Fleet, deploy time.Duration) (time.Duration, error)

func MaxWaitFromFleet

func MaxWaitFromFleet(fleet *domain.Fleet, deploy *time.Duration) (*time.Duration, error)

Types

type DeltaCandidate

type DeltaCandidate struct {
	ImageRepository string
	CurrentDigest   string
	NewDigest       string
}

type DeltaCandidateResult

type DeltaCandidateResult struct {
	Candidates []DeltaCandidate
	Skip       bool
	Superseded bool
	Fleet      *domain.Fleet
}

type Handler

type Handler struct {
	Now                    func() time.Time
	MaxWaitForDelta        *time.Duration
	DeltaGenerationTimeout time.Duration
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(
	resolver *Resolver,
	emit func(ctx context.Context, orgID uuid.UUID, event *domain.Event) error,
	prepareService deltaprepare.Service,
	generationService deltageneration.Service,
	prepareGenerationService deltapreparegeneration.Service,
) (*Handler, error)

func (*Handler) Prepare

type Resolver

type Resolver struct {
	FleetService           fleetservice.Service
	DeviceService          deviceservice.Service
	RepositoryService      repositoryservice.Service
	TemplateVersionService templateversionservice.Service
	Config                 *deltaconfig.DeltaGenerationConfig
	Log                    logrus.FieldLogger

	Inspect          func(ctx context.Context, orgId uuid.UUID, image string) (string, error)
	InspectForSource func(
		ctx context.Context,
		orgId uuid.UUID,
		image string,
		sourceDigest string,
		fallbackPlatform *ocispec.Platform,
	) (resolvedSourceDigest, targetDigest string, err error)
	Render func(ctx context.Context, orgId uuid.UUID, device *domain.Device, spec *domain.DeviceSpec) (tasks.RenderedSpec, error)
	Expand func(context.Context, uuid.UUID, *domain.Device, tasks.RenderedSpec, []DeltaCandidate) []DeltaCandidate
}

func (*Resolver) DeltaCandidates

Jump to

Keyboard shortcuts

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