Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotResolve = errors.New("could not resolve image with registered resolvers")
ErrCouldNotResolve is returned when image couldn't be resolved.
View Source
var ( // ErrNotFound is returned when there is no environment variable set for // given KO path. ErrNotFound = errors.New("expected environment variable not found") )
View Source
var Resolvers = make([]Resolver, 0, 1) //nolint:gochecknoglobals
Resolvers an array of resolvers to which resolvers could be added for downstream projects.
Functions ¶
func ResolveImages ¶
func ResolveImages(packages []PackageResolver) environment.EnvOpts
ResolveImages will try to resolve the images, using given resolver(s).
Types ¶
type EnvironmentalBasedResolver ¶
type EnvironmentalBasedResolver struct {
Prefix string
}
EnvironmentalBasedResolver will try to resolve the images from prefixed environment variables.
func (*EnvironmentalBasedResolver) Applicable ¶
func (c *EnvironmentalBasedResolver) Applicable() bool
type PackageResolver ¶ added in v0.34.0
PackageResolver is a function that will return package name for given context.
func ExplicitPackage ¶ added in v0.34.0
func ExplicitPackage(pack string) PackageResolver
ExplicitPackage will return given package.
type Resolver ¶
type Resolver interface { // Resolve will resolve given KO package path into real OCI image reference. Resolve(kopath string) (name.Reference, error) // Applicable will tell that given resolver is applicable to current runtime // environment, or not. Applicable() bool }
Resolver will resolve given KO package paths into real OCI images references. This interface probably should be moved into reconciler-test framework. See: https://github.com/knative-sandbox/reconciler-test/issues/303
Click to show internal directories.
Click to hide internal directories.