Documentation ¶
Index ¶
- func IsErrorUnrecoverable(err error) bool
- type Client
- func (c *Client) Close() error
- func (c *Client) GetBundle(ctx context.Context, packageName, channelName, csvName string) (*registry.Bundle, error)
- func (c *Client) GetBundleInPackageChannel(ctx context.Context, packageName, channelName string) (*registry.Bundle, error)
- func (c *Client) GetBundleThatProvides(ctx context.Context, group, version, kind string) (*registry.Bundle, error)
- func (c *Client) GetReplacementBundleInPackageChannel(ctx context.Context, currentName, packageName, channelName string) (*registry.Bundle, error)
- func (c *Client) HealthCheck(ctx context.Context, reconnectTimeout time.Duration) (bool, error)
- type HealthError
- type HealthErrorReason
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorUnrecoverable ¶
IsErrorUnrecoverable reports if a given error is one of the predefined unrecoverable types
Types ¶
type Client ¶
type Client struct { Registry api.RegistryClient Health grpc_health_v1.HealthClient Conn *grpc.ClientConn }
func (*Client) GetBundleInPackageChannel ¶
func (*Client) GetBundleThatProvides ¶
func (*Client) GetReplacementBundleInPackageChannel ¶
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) (*registry.Bundle, error) GetBundleInPackageChannel(ctx context.Context, packageName, channelName string) (*registry.Bundle, error) GetReplacementBundleInPackageChannel(ctx context.Context, currentName, packageName, channelName string) (*registry.Bundle, error) GetBundleThatProvides(ctx context.Context, group, version, kind string) (*registry.Bundle, error) HealthCheck(ctx context.Context, reconnectTimeout time.Duration) (bool, error) Close() error }
Click to show internal directories.
Click to hide internal directories.