registry

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ConfigMapCRDName     = "customResourceDefinitions"
	ConfigMapCSVName     = "clusterServiceVersions"
	ConfigMapPackageName = "packages"
	ExistingOperatorKey  = "@existing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogKey

type CatalogKey struct {
	Name      string
	Namespace string
}

func NewVirtualCatalogKey

func NewVirtualCatalogKey(namespace string) CatalogKey

func (*CatalogKey) Empty

func (k *CatalogKey) Empty() bool

func (*CatalogKey) Equal

func (k *CatalogKey) Equal(compare CatalogKey) bool

func (*CatalogKey) String

func (k *CatalogKey) String() string

func (*CatalogKey) Virtual

func (k *CatalogKey) Virtual() bool

Virtual indicates if this is a "virtual" catalog representing the currently installed operators in a namespace

type ChannelEntryIterator

type ChannelEntryIterator struct {
	// contains filtered or unexported fields
}

ChannelEntryIterator struct

func NewChannelEntryIterator

func NewChannelEntryIterator(stream ChannelEntryStream) *ChannelEntryIterator

NewChannelEntryIterator returns a new ChannelEntryIterator

func (*ChannelEntryIterator) Error

func (ceit *ChannelEntryIterator) Error() error

func (*ChannelEntryIterator) Next

Next returns the next Channel Entry in the grpc stream

type ChannelEntryStream

type ChannelEntryStream interface {
	Recv() (*registryapi.ChannelEntry, error)
}

ChannelEntryStream interface

type Client

type Client struct {
	*client.Client
}

Client struct with a registry client embedded

func NewClientFromConn

func NewClientFromConn(conn *grpc.ClientConn) *Client

NewClientFromConn returns the next Channel Entry in the grpc stream

func (*Client) FindBundleThatProvides

func (rc *Client) FindBundleThatProvides(ctx context.Context, group, version, kind string, excludedPackages map[string]struct{}) (*registryapi.Bundle, error)

FindBundleThatProvides returns a bundle that provides the request API and doesn't belong to the provided package

func (*Client) GetLatestChannelEntriesThatProvide

func (rc *Client) GetLatestChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (*ChannelEntryIterator, error)

GetLatestChannelEntriesThatProvide uses registry client to get a list of latest channel entries that provide the requested API (via an iterator)

type ClientInterface

type ClientInterface interface {
	client.Interface
	FindBundleThatProvides(ctx context.Context, group, version, kind string, excludedPackages map[string]struct{}) (*registryapi.Bundle, error)
	GetLatestChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (*ChannelEntryIterator, error)
}

ClientInterface that extends client.Interface

type PackageChannel

type PackageChannel struct {
	// Name is the name of the channel, e.g. `alpha` or `stable`
	Name string `json:"name"`

	// CurrentCSV defines a reference to the CSV holding the version of this package currently
	// for the channel.
	CurrentCSVName string `json:"currentCSV"`
}

PackageChannel defines a single channel under a package, pointing to a version of that package.

func (PackageChannel) IsDefaultChannel

func (pc PackageChannel) IsDefaultChannel(pm PackageManifest) bool

IsDefaultChannel returns true if the PackageChennel is the default for the PackageManifest

type PackageManifest

type PackageManifest struct {
	// PackageName is the name of the overall package, ala `etcd`.
	PackageName string `json:"packageName"`

	// Channels are the declared channels for the package, ala `stable` or `alpha`.
	Channels []PackageChannel `json:"channels"`

	// DefaultChannel is, if specified, the name of the default channel for the package. The
	// default channel will be installed if no other channel is explicitly given. If the package
	// has a single channel, then that channel is implicitly the default.
	DefaultChannelName string `json:"defaultChannel"`
}

PackageManifest holds information about a package, which is a reference to one (or more) channels under a single package.

func (PackageManifest) GetDefaultChannel

func (m PackageManifest) GetDefaultChannel() string

GetDefaultChannel gets the default channel or returns the only one if there's only one. returns empty string if it can't determine the default

type ResourceKey

type ResourceKey struct {
	Name      string
	Kind      string
	Namespace string
}

ResourceKey contains metadata to uniquely identify a resource

Directories

Path Synopsis
fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
solver
Package solver implements a general-purpose solver for boolean constraint satisfiability problems.
Package solver implements a general-purpose solver for boolean constraint satisfiability problems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL