bundle

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ActiveBundleNamespace       = "eksa-packages"
	PackageBundleControllerName = "eksa-packages-bundle-controller"
)

Variables

This section is empty.

Functions

func NewBundleManager

func NewBundleManager(log logr.Logger, serverVersion discovery.ServerVersionInterface,
	puller artifacts.Puller) (manager *bundleManager)

Types

type Manager

type Manager interface {
	// IsActive returns true if the given namespace and name matche the active
	// bundle's.
	IsActive(ctx context.Context, client client.Client,
		namespacedName types.NamespacedName) (bool, error)

	// ActiveBundle retrieves the currently active bundle.
	ActiveBundle(ctx context.Context, client client.Client) (
		*api.PackageBundle, error)

	// Update the bundle returns true if there are changes
	Update(newBundle *api.PackageBundle, isActive bool,
		allBundles []api.PackageBundle) bool

	// IsBundleKnown returns true if the bundle is in the list of known
	// bundles.
	IsBundleKnown(ctx context.Context,
		knownBundles []api.PackageBundle, bundle *api.PackageBundle) bool

	// IsBundleOlderThan returns true if the current name is older than the
	// candidate.
	IsBundleOlderThan(current, candidate string) (bool, error)

	// LatestBundle pulls the bundle tagged with "latest" from the bundle source.
	LatestBundle(ctx context.Context, baseRef string) (
		*api.PackageBundle, error)

	// IsActiveController returns true if the given namespace and name matches
	// the active bundle controller's.
	IsActiveController(namespacedName types.NamespacedName) bool

	SortBundlesNewestFirst(bundles []api.PackageBundle)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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