errors

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package errors contains error messages and error types for the Service Mesh

Index

Constants

This section is empty.

Variables

View Source
var ErrCheckingExistence = errors.New("error looking for existing mesh")

ErrCheckingExistence is returned when the mesh already exists.

View Source
var ErrDeployingMesh = errors.New("failed to deploy NGINX Service Mesh")

ErrDeployingMesh is returned when the mesh fails to deploy.

View Source
var ErrInput = errors.New("error validating input")

ErrInput is returned when CLI arguments are invalid.

View Source
var ErrK8sAPIResponse = errors.New("kubernetes API returned error")

ErrK8sAPIResponse is returned when the k8s API returns an error.

View Source
var ErrMeshAPIResponse = errors.New("mesh API returned error")

ErrMeshAPIResponse is returned when the mesh API returns an error.

View Source
var ErrMeshStatus = errors.New("failed to connect to Mesh API Server, ensure you are authenticated with the Kubernetes API Server")

ErrMeshStatus is returned when the CLI cannot reach the mesh API.

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when a 404 is returned by mesh API or mesh API is not running.

Functions

func CheckForK8sFatalError

func CheckForK8sFatalError(err error) (bool, string)

CheckForK8sFatalError checks if k8s error is fatal and returns instruction message. Fatal in this case means that the error will keep happening until the user addresses the issue.

func NamespaceExistsError

func NamespaceExistsError(err error) string

NamespaceExistsError returns instructions if the error is due to the namespace already existing.

Types

type AlreadyExistsError

type AlreadyExistsError struct {
	Msg string
}

AlreadyExistsError is returned when the mesh already exists.

func (AlreadyExistsError) Error

func (e AlreadyExistsError) Error() string

type DeleteFailedError

type DeleteFailedError struct{}

DeleteFailedError error for when at least one resource could not be deleted, e.g. delete call returns an error.

func (DeleteFailedError) Error

func (DeleteFailedError) Error() string

type ImagePullError

type ImagePullError struct {
	Msg string
}

ImagePullError is returned when k8s fails to pull images.

func (ImagePullError) Error

func (e ImagePullError) Error() string

type InternalServiceError

type InternalServiceError struct {
	Msg string
}

InternalServiceError is for when the NIGNX Service Mesh API returns an internal error.

func (InternalServiceError) Error

func (e InternalServiceError) Error() string

type InvalidRequestError

type InvalidRequestError struct {
	Msg string
}

InvalidRequestError is for when the NGINX Service Mesh API returns a 400.

func (InvalidRequestError) Error

func (e InvalidRequestError) Error() string

type NamespaceNotFoundError

type NamespaceNotFoundError struct {
	Namespace string
}

NamespaceNotFoundError is for when the NGINX Service Mesh namespace is not found.

func (NamespaceNotFoundError) Error

func (e NamespaceNotFoundError) Error() string

type TimedOutDeletingError

type TimedOutDeletingError struct{}

TimedOutDeletingError error for when at least one resource fails to delete within a time window.

func (TimedOutDeletingError) Error

func (TimedOutDeletingError) Error() string

type UnexpectedStatusError

type UnexpectedStatusError struct {
	Code int
}

UnexpectedStatusError is for when the NIGNX Service Mesh API returns an unexpected status code.

func (UnexpectedStatusError) Error

func (e UnexpectedStatusError) Error() string

Jump to

Keyboard shortcuts

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