source

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract interface {
	// FetchCRD fetches the latest CRD if there is an update available.
	// The returned thing is the location to the CRD. This function should not return the CRD content
	// as it could be several megabytes large.
	FetchCRD(ctx context.Context, dir string, obj *v1alpha1.Bootstrap, revision string) (string, error)
	// HasUpdate returns true and the version if there is an update available.
	// In case of a URL this would be the digest. This logic follows this general guide:
	// - Fetch latest version that satisfies the constraint
	// - Compare to last applied revision
	// - Return true and the version if there is something to apply
	// - Return false and empty string if there is nothing to apply.
	HasUpdate(ctx context.Context, obj *v1alpha1.Bootstrap) (bool, string, error)
}

Contract defines the capabilities of a source provider.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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