resolver

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InClusterResolver added in v0.17.0

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

InClusterResolver resolves packages that are already installed in the cluster on the client-side. Note, that unlike other resolvers, the resulting 'packages.Package' struct does not contain package 'packages.Files' (we don't have the original files).

func (InClusterResolver) Resolve added in v0.17.0

func (r InClusterResolver) Resolve(name string, appVersion string, operatorVersion string) (*packages.Package, error)

type LocalResolver

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

LocalResolver will find local operator packages: folders or tgz

func NewLocal

func NewLocal() *LocalResolver

NewLocal creates a resolver for local operator package

func (*LocalResolver) Resolve

func (f *LocalResolver) Resolve(name string, appVersion string, operatorVersion string) (*packages.Package, error)

Resolve a local package. The path can be relative or absolute location of the packages. Order of the discovery is: 1. tarball 2. dir based

type PackageResolver

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

PackageResolver is the source of resolver of operator packages.

func (*PackageResolver) Resolve

func (m *PackageResolver) Resolve(name string, appVersion string, operatorVersion string) (p *packages.Package, err error)

Resolve provides a one stop to acquire any non-repo packages by trying to look for package files resolving the operator name to: - a local tgz file - a local directory - a url to a tgz - an operator name in the remote repository in that order. For local access there is a need to provide absolute or relative path as part of the name argument. `cassandra` without a path component will resolve to the remote repo. `./cassandra` will resolve to a folder which is expected to have the operator structure on the filesystem. `../folder/cassandra.tgz` will resolve to the cassandra package tarball on the filesystem.

type Resolver

type Resolver interface {
	Resolve(name string, appVersion string, operatorVersion string) (*packages.Package, error)
}

Resolver will try to resolve a given package name to either local tarball, folder, remote url or an operator in the remote repository.

func New

func New(repo *repo.Client) Resolver

New creates an operator package resolver for non-repository packages

func NewInClusterResolver added in v0.17.0

func NewInClusterResolver(c *kudo.Client, ns string) Resolver

NewInClusterResolver returns an initialized InClusterResolver for resolving already installed packages

type URLResolver

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

URLResolver will resolve a packages from a url

func NewURL

func NewURL() *URLResolver

NewURL creates an instance of a URLResolver

func (*URLResolver) Resolve

func (f *URLResolver) Resolve(name string, appVersion string, operatorVersion string) (*packages.Package, error)

Resolve returns a package for the provided url

Jump to

Keyboard shortcuts

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