Documentation
¶
Index ¶
- Variables
- func APIKeyToGVKHash(key opregistry.APIKey) (string, error)
- func APIKeyToGVKString(key opregistry.APIKey) string
- func Matches(o *Operator, p ...OperatorPredicate) 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 MultiCatalogOperatorFinder
- type NamespacedOperatorCache
- func (c *NamespacedOperatorCache) Catalog(k SourceKey) OperatorFinder
- func (c *NamespacedOperatorCache) Error() error
- func (c *NamespacedOperatorCache) Find(p ...OperatorPredicate) []*Operator
- func (c *NamespacedOperatorCache) FindPreferred(preferred *SourceKey, preferredNamespace string, p ...OperatorPredicate) []*Operator
- func (c *NamespacedOperatorCache) WithExistingOperators(snapshot *Snapshot, namespace string) MultiCatalogOperatorFinder
- type Operator
- type OperatorCacheProvider
- type OperatorFinder
- type OperatorPredicate
- func And(p ...OperatorPredicate) OperatorPredicate
- func BooleanPredicate(result bool) OperatorPredicate
- func CSVNamePredicate(name string) OperatorPredicate
- func CatalogPredicate(key SourceKey) OperatorPredicate
- func ChannelPredicate(channel string) OperatorPredicate
- func CountingPredicate(p OperatorPredicate, n *int) OperatorPredicate
- func False() OperatorPredicate
- func LabelPredicate(label string) OperatorPredicate
- func Or(p ...OperatorPredicate) OperatorPredicate
- func PkgPredicate(pkg string) OperatorPredicate
- func ProvidingAPIPredicate(api opregistry.APIKey) OperatorPredicate
- func ReplacesPredicate(replaces string) OperatorPredicate
- func SkipRangeIncludesPredicate(version semver.Version) OperatorPredicate
- func True() OperatorPredicate
- func VersionInRangePredicate(r semver.Range, version string) OperatorPredicate
- type OperatorSet
- type OperatorSourceInfo
- type Option
- 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
func Matches ¶
func Matches(o *Operator, p ...OperatorPredicate) bool
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]*Operator
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(...OperatorPredicate) []*Operator
type MultiCatalogOperatorFinder ¶
type MultiCatalogOperatorFinder interface { Catalog(SourceKey) OperatorFinder FindPreferred(preferred *SourceKey, preferredNamespace string, predicates ...OperatorPredicate) []*Operator 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 ...OperatorPredicate) []*Operator
func (*NamespacedOperatorCache) FindPreferred ¶
func (c *NamespacedOperatorCache) FindPreferred(preferred *SourceKey, preferredNamespace string, p ...OperatorPredicate) []*Operator
func (*NamespacedOperatorCache) WithExistingOperators ¶
func (c *NamespacedOperatorCache) WithExistingOperators(snapshot *Snapshot, namespace string) MultiCatalogOperatorFinder
type Operator ¶
type Operator 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 ¶
func Filter ¶
func Filter(operators []*Operator, p ...OperatorPredicate) []*Operator
type OperatorCacheProvider ¶
type OperatorCacheProvider interface { Namespaced(namespaces ...string) MultiCatalogOperatorFinder Expire(catalog SourceKey) }
type OperatorFinder ¶
type OperatorFinder interface {
Find(...OperatorPredicate) []*Operator
}
type OperatorPredicate ¶
func And ¶
func And(p ...OperatorPredicate) OperatorPredicate
func BooleanPredicate ¶
func BooleanPredicate(result bool) OperatorPredicate
func CSVNamePredicate ¶
func CSVNamePredicate(name string) OperatorPredicate
func CatalogPredicate ¶
func CatalogPredicate(key SourceKey) OperatorPredicate
func ChannelPredicate ¶
func ChannelPredicate(channel string) OperatorPredicate
func CountingPredicate ¶
func CountingPredicate(p OperatorPredicate, n *int) OperatorPredicate
func False ¶
func False() OperatorPredicate
func LabelPredicate ¶
func LabelPredicate(label string) OperatorPredicate
func Or ¶
func Or(p ...OperatorPredicate) OperatorPredicate
func PkgPredicate ¶
func PkgPredicate(pkg string) OperatorPredicate
func ProvidingAPIPredicate ¶
func ProvidingAPIPredicate(api opregistry.APIKey) OperatorPredicate
func ReplacesPredicate ¶
func ReplacesPredicate(replaces string) OperatorPredicate
func SkipRangeIncludesPredicate ¶
func SkipRangeIncludesPredicate(version semver.Version) OperatorPredicate
func True ¶
func True() OperatorPredicate
func VersionInRangePredicate ¶
func VersionInRangePredicate(r semver.Range, version string) OperatorPredicate
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 SourceKey ¶
func NewVirtualSourceKey ¶
type SourceProvider ¶
type StaticSourceProvider ¶
Click to show internal directories.
Click to hide internal directories.