resolver

package
v0.14.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 New

func New(repo *repo.Client) *PackageResolver

New creates an operator package resolver for non-repository 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. Should there exist a local folder e.g. `cassandra` it will take precedence over the remote repository package with the same name.

type Resolver

type Resolver interface {
	Resolve(name string, version 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.

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