resolver

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 11 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. 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.

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