Documentation ¶
Index ¶
- func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
- func APIKeyToGVKString(key opregistry.APIKey) string
- func Matches(o *Entry, p ...Predicate) bool
- func ValidOnce() <-chan struct{}
- type APISet
- func (s APISet) Difference(set APISet) APISet
- func (s APISet) Intersection(sets ...APISet) APISet
- func (s APISet) IsSubset(set APISet) bool
- func (s APISet) PopAPIKey() *opregistry.APIKey
- func (s APISet) String() string
- func (s APISet) StripPlural() APISet
- func (s APISet) Union(sets ...APISet) APISet
- type Cache
- type EmptyOperatorFinder
- type Entry
- type MultiCatalogOperatorFinder
- type NamespacedOperatorCache
- func (c *NamespacedOperatorCache) Catalog(k SourceKey) OperatorFinder
- func (c *NamespacedOperatorCache) Error() error
- func (c *NamespacedOperatorCache) Find(p ...Predicate) []*Entry
- func (c *NamespacedOperatorCache) FindPreferred(preferred *SourceKey, preferredNamespace string, p ...Predicate) []*Entry
- type OperatorCacheProvider
- type OperatorFinder
- type OperatorSourceInfo
- type Option
- type Predicate
- func And(p ...Predicate) Predicate
- func BooleanPredicate(result bool) Predicate
- func CSVNamePredicate(name string) Predicate
- func CatalogPredicate(key SourceKey) Predicate
- func ChannelPredicate(channel string) Predicate
- func CountingPredicate(p Predicate, n *int) Predicate
- func CreateCelPredicate(env *constraints.CelEnvironment, rule string, failureMessage string) (Predicate, error)
- func False() Predicate
- func LabelPredicate(label string) Predicate
- func Not(p ...Predicate) Predicate
- func Or(p ...Predicate) Predicate
- func PkgPredicate(pkg string) Predicate
- func ProvidingAPIPredicate(api opregistry.APIKey) Predicate
- func ReplacesPredicate(replaces string) Predicate
- func SkipRangeIncludesPredicate(version semver.Version) Predicate
- func True() Predicate
- func VersionInRangePredicate(r semver.Range, version string) Predicate
- type Snapshot
- type Source
- type SourceKey
- type SourcePriorityProvider
- type SourceProvider
- type StaticSourceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyToGVKHash ¶
func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
func APIKeyToGVKString ¶
func APIKeyToGVKString(key opregistry.APIKey) string
Types ¶
type APISet ¶
type APISet map[opregistry.APIKey]struct{}
todo: drop fields from cache.Entry and move to pkg/controller/operators/olm
func EmptyAPISet ¶
func EmptyAPISet() APISet
func (APISet) Difference ¶
func (APISet) Intersection ¶
Intersection returns the intersection of the APISet and the given list of APISets
func (APISet) PopAPIKey ¶
func (s APISet) PopAPIKey() *opregistry.APIKey
func (APISet) StripPlural ¶
StripPlural returns the APISet with the Plural field of all APIKeys removed
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func New ¶
func New(sp SourceProvider, options ...Option) *Cache
func (*Cache) Namespaced ¶
func (c *Cache) Namespaced(namespaces ...string) MultiCatalogOperatorFinder
type EmptyOperatorFinder ¶
type EmptyOperatorFinder struct{}
func (EmptyOperatorFinder) Find ¶
func (f EmptyOperatorFinder) Find(...Predicate) []*Entry
type Entry ¶ added in v0.20.0
type Entry struct { Name string Replaces string Skips []string SkipRange semver.Range ProvidedAPIs APISet RequiredAPIs APISet Version *semver.Version SourceInfo *OperatorSourceInfo Properties []*api.Property BundlePath string // Present exclusively to pipe inlined bundle // content. Resolver components shouldn't need to read this, // and it should eventually be possible to remove the field // altogether. Bundle *api.Bundle }
func ExactlyOne ¶
type MultiCatalogOperatorFinder ¶
type MultiCatalogOperatorFinder interface { Catalog(SourceKey) OperatorFinder FindPreferred(preferred *SourceKey, preferredNamespace string, predicates ...Predicate) []*Entry Error() error OperatorFinder }
type NamespacedOperatorCache ¶
type NamespacedOperatorCache struct {
// contains filtered or unexported fields
}
func (*NamespacedOperatorCache) Catalog ¶
func (c *NamespacedOperatorCache) Catalog(k SourceKey) OperatorFinder
func (*NamespacedOperatorCache) Error ¶
func (c *NamespacedOperatorCache) Error() error
func (*NamespacedOperatorCache) Find ¶
func (c *NamespacedOperatorCache) Find(p ...Predicate) []*Entry
func (*NamespacedOperatorCache) FindPreferred ¶
func (c *NamespacedOperatorCache) FindPreferred(preferred *SourceKey, preferredNamespace string, p ...Predicate) []*Entry
type OperatorCacheProvider ¶
type OperatorCacheProvider interface {
Namespaced(namespaces ...string) MultiCatalogOperatorFinder
}
type OperatorFinder ¶
type OperatorSourceInfo ¶
type OperatorSourceInfo struct { Package string Channel string StartingCSV string Catalog SourceKey DefaultChannel bool Subscription *v1alpha1.Subscription }
func (*OperatorSourceInfo) String ¶
func (i *OperatorSourceInfo) String() string
type Option ¶
type Option func(*Cache)
func WithLogger ¶
func WithSourcePriorityProvider ¶ added in v0.21.0
func WithSourcePriorityProvider(spp SourcePriorityProvider) Option
type Predicate ¶ added in v0.20.0
func BooleanPredicate ¶
func CSVNamePredicate ¶
func CatalogPredicate ¶
func ChannelPredicate ¶
func CountingPredicate ¶
func CreateCelPredicate ¶ added in v0.20.0
func CreateCelPredicate(env *constraints.CelEnvironment, rule string, failureMessage string) (Predicate, error)
func LabelPredicate ¶
func PkgPredicate ¶
func ProvidingAPIPredicate ¶
func ProvidingAPIPredicate(api opregistry.APIKey) Predicate
func ReplacesPredicate ¶
func SkipRangeIncludesPredicate ¶
func SkipRangeIncludesPredicate(version semver.Version) Predicate
func VersionInRangePredicate ¶
type Snapshot ¶
type Snapshot struct { Entries []*Entry // Unless closed, the Snapshot is valid. Valid <-chan struct{} }
type SourceKey ¶
func NewVirtualSourceKey ¶
type SourcePriorityProvider ¶ added in v0.21.0
type SourceProvider ¶
type StaticSourceProvider ¶
Click to show internal directories.
Click to hide internal directories.