bundle

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBundleManager

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

func NewPackageBundleClient added in v0.1.7

func NewPackageBundleClient(client client.Client) *bundleClient

Types

type Client added in v0.1.7

type Client interface {
	// IsActive returns true if the bundle is the active bundle
	IsActive(ctx context.Context, namespacedName types.NamespacedName) (bool, error)

	// GetActiveBundle retrieves the currently active bundle.
	GetActiveBundle(ctx context.Context) (activeBundle *api.PackageBundle, err error)

	// GetActiveBundleNamespacedName retrieves the namespace and name of the
	// currently active bundle.
	GetActiveBundleNamespacedName(ctx context.Context) (
		types.NamespacedName, error)
}

type Manager

type Manager interface {
	// 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

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

	// DownloadBundle downloads the bundle with a given tag.
	DownloadBundle(ctx context.Context, ref string) (
		*api.PackageBundle, error)

	SortBundlesDescending(bundles []api.PackageBundle)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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