Documentation ¶
Index ¶
- Variables
- func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
- func APIKeyToGVKString(key opregistry.APIKey) string
- func Matches(o *Entry, p ...Predicate) bool
- type APIMultiOwnerSet
- type APIOwnerSet
- 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
- func (c *NamespacedOperatorCache) WithExistingOperators(snapshot *Snapshot, namespace string) MultiCatalogOperatorFinder
- type OperatorCacheProvider
- type OperatorFinder
- type OperatorSet
- 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, message 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 SourceProvider
- type StaticSourceProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ExistingOperator = OperatorSourceInfo{Package: "", Channel: "", StartingCSV: "", Catalog: NoCatalog, DefaultChannel: false}
View Source
var NoCatalog = SourceKey{Name: "", Namespace: ""}
Functions ¶
func APIKeyToGVKHash ¶
func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
func APIKeyToGVKString ¶
func APIKeyToGVKString(key opregistry.APIKey) string
Types ¶
type APIMultiOwnerSet ¶
type APIMultiOwnerSet map[opregistry.APIKey]OperatorSet
func EmptyAPIMultiOwnerSet ¶
func EmptyAPIMultiOwnerSet() APIMultiOwnerSet
func (APIMultiOwnerSet) PopAPIKey ¶
func (s APIMultiOwnerSet) PopAPIKey() *opregistry.APIKey
func (APIMultiOwnerSet) PopAPIRequirers ¶
func (s APIMultiOwnerSet) PopAPIRequirers() OperatorSet
type APIOwnerSet ¶
type APIOwnerSet map[opregistry.APIKey]*Entry
func EmptyAPIOwnerSet ¶
func EmptyAPIOwnerSet() APIOwnerSet
type APISet ¶
type APISet map[opregistry.APIKey]struct{}
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 WithExistingOperators(snapshot *Snapshot, namespace string) MultiCatalogOperatorFinder 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
func (*NamespacedOperatorCache) WithExistingOperators ¶
func (c *NamespacedOperatorCache) WithExistingOperators(snapshot *Snapshot, namespace string) MultiCatalogOperatorFinder
type OperatorCacheProvider ¶
type OperatorCacheProvider interface { Namespaced(namespaces ...string) MultiCatalogOperatorFinder Expire(catalog SourceKey) }
type OperatorFinder ¶
type OperatorSet ¶
func EmptyOperatorSet ¶
func EmptyOperatorSet() OperatorSet
func (OperatorSet) Snapshot ¶
func (o OperatorSet) Snapshot() OperatorSet
Snapshot returns a new set, pointing to the same values
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 WithCatalogSourceLister ¶
func WithCatalogSourceLister(catalogSourceLister v1alpha1.CatalogSourceLister) Option
func WithLogger ¶
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, message 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 SourceKey ¶
func NewVirtualSourceKey ¶
type SourceProvider ¶
type StaticSourceProvider ¶
Click to show internal directories.
Click to hide internal directories.