Documentation ¶
Overview ¶
Package errors contains error messages and error types for the Service Mesh
Index ¶
- Variables
- func CheckForK8sFatalError(err error) (bool, string)
- func NamespaceExistsError(err error) string
- type AlreadyExistsError
- type DeleteFailedError
- type ImagePullError
- type InternalServiceError
- type InvalidRequestError
- type NamespaceNotFoundError
- type TimedOutDeletingError
- type UnexpectedStatusError
Constants ¶
This section is empty.
Variables ¶
var ErrCheckingExistence = errors.New("error looking for existing mesh")
ErrCheckingExistence is returned when the mesh already exists.
var ErrDeployingMesh = errors.New("failed to deploy NGINX Service Mesh")
ErrDeployingMesh is returned when the mesh fails to deploy.
var ErrInput = errors.New("error validating input")
ErrInput is returned when CLI arguments are invalid.
var ErrK8sAPIResponse = errors.New("kubernetes API returned error")
ErrK8sAPIResponse is returned when the k8s API returns an error.
var ErrMeshAPIResponse = errors.New("mesh API returned error")
ErrMeshAPIResponse is returned when the mesh API returns an error.
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.
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 ¶
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 ¶
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