client

package
v1.74.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 9 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorUnrecoverable

func IsErrorUnrecoverable(err error) bool

IsErrorUnrecoverable reports if a given error is one of the predefined unrecoverable types

func NewKubeClient

func NewKubeClient(kubeconfig string, logger *logrus.Logger) (*kubernetes.Clientset, error)

Types

type BundleIterator

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

func NewBundleIterator

func NewBundleIterator(stream BundleStream) *BundleIterator

func (*BundleIterator) Error

func (it *BundleIterator) Error() error

func (*BundleIterator) Next

func (it *BundleIterator) Next() *api.Bundle

type BundleStream

type BundleStream interface {
	Recv() (*api.Bundle, error)
}

type Client

type Client struct {
	Registry api.RegistryClient
	Health   grpc_health_v1.HealthClient
	Conn     *grpc.ClientConn
}

func NewClient

func NewClient(address string) (*Client, error)

func NewClientFromConn

func NewClientFromConn(conn *grpc.ClientConn) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) GetBundle

func (c *Client) GetBundle(ctx context.Context, packageName, channelName, csvName string) (*api.Bundle, error)

func (*Client) GetBundleInPackageChannel

func (c *Client) GetBundleInPackageChannel(ctx context.Context, packageName, channelName string) (*api.Bundle, error)

func (*Client) GetBundleThatProvides

func (c *Client) GetBundleThatProvides(ctx context.Context, group, version, kind string) (*api.Bundle, error)

func (*Client) GetPackage

func (c *Client) GetPackage(ctx context.Context, packageName string) (*api.Package, error)

func (*Client) GetReplacementBundleInPackageChannel

func (c *Client) GetReplacementBundleInPackageChannel(ctx context.Context, currentName, packageName, channelName string) (*api.Bundle, error)

func (*Client) HealthCheck

func (c *Client) HealthCheck(ctx context.Context, reconnectTimeout time.Duration) (bool, error)

func (*Client) ListBundles

func (c *Client) ListBundles(ctx context.Context) (*BundleIterator, error)

type HealthError

type HealthError struct {
	ClientState string
	Reason      HealthErrorReason
	Message     string
}

HealthError is used to represent error types for health checks

func NewHealthError

func NewHealthError(conn *grpc.ClientConn, reason HealthErrorReason, msg string) HealthError

func (HealthError) Error

func (e HealthError) Error() string

Error implements the Error interface.

type HealthErrorReason

type HealthErrorReason string
const (
	HealthErrReasonUnrecoveredTransient HealthErrorReason = "UnrecoveredTransient"
	HealthErrReasonConnection           HealthErrorReason = "ConnectionError"
	HealthErrReasonUnknown              HealthErrorReason = "Unknown"
)

type Interface

type Interface interface {
	GetBundle(ctx context.Context, packageName, channelName, csvName string) (*api.Bundle, error)
	GetBundleInPackageChannel(ctx context.Context, packageName, channelName string) (*api.Bundle, error)
	GetReplacementBundleInPackageChannel(ctx context.Context, currentName, packageName, channelName string) (*api.Bundle, error)
	GetBundleThatProvides(ctx context.Context, group, version, kind string) (*api.Bundle, error)
	ListBundles(ctx context.Context) (*BundleIterator, error)
	GetPackage(ctx context.Context, packageName string) (*api.Package, error)
	HealthCheck(ctx context.Context, reconnectTimeout time.Duration) (bool, error)
	Close() error
}

Jump to

Keyboard shortcuts

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