errors

package
v1.44.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ClusterNotFoundErrorMessage = "Cluster not found."
View Source
const InstanceTypeChangedErrorMessage = "Container instance type changes are not supported."

InstanceTypeChangedErrorMessage is the error message to print for the instance type changed error when registering a container instance

Variables

This section is empty.

Functions

func IsClusterNotFoundError added in v1.25.0

func IsClusterNotFoundError(err error) bool

func IsInstanceTypeChangedError

func IsInstanceTypeChangedError(err error) bool

IsInstanceTypeChangedError returns true if the error when registering the container instance is because of instance type being changed

func NewMultiError

func NewMultiError(errs ...error) error

NewMultiError creates a new MultErr object

Types

type AttributeError

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

AttributeError defines an error type to indicate an error with an ECS attribute

func NewAttributeError

func NewAttributeError(err string) AttributeError

NewAttributeError creates a new AttributeError object

func (AttributeError) Error

func (e AttributeError) Error() string

Error returns the error string for AttributeError

type BadVolumeError

type BadVolumeError struct {
	Msg string
}

BadVolumeError represents an error caused by bad volume

func (*BadVolumeError) Error

func (err *BadVolumeError) Error() string

func (*BadVolumeError) ErrorName

func (err *BadVolumeError) ErrorName() string

ErrorName returns name of the BadVolumeError

func (*BadVolumeError) Retry

func (err *BadVolumeError) Retry() bool

Retry implements Retirable interface

type DefaultNamedError

type DefaultNamedError struct {
	Err  string `json:"error"`
	Name string `json:"name"`
}

DefaultNamedError is a wrapper type for 'error' which adds an optional name and provides a symmetric marshal/unmarshal

func NewNamedError

func NewNamedError(err error) *DefaultNamedError

NewNamedError creates a NamedError.

func (*DefaultNamedError) Error

func (err *DefaultNamedError) Error() string

Error implements error

func (*DefaultNamedError) ErrorName

func (err *DefaultNamedError) ErrorName() string

ErrorName implements NamedError

type DefaultRetriable

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

DefaultRetriable implements the Retriable interface with a boolean to indicate if retry should occur

func (DefaultRetriable) Retry

func (dr DefaultRetriable) Retry() bool

Retry returns true if the operation can be retried

type DefaultRetriableError

type DefaultRetriableError struct {
	Retriable
	// contains filtered or unexported fields
}

DefaultRetriableError is used to wrap a retriable error

type DockerClientConfigError

type DockerClientConfigError struct {
	Msg string
}

DockerClientConfigError represents the error caused by docker client

func (*DockerClientConfigError) Error

func (err *DockerClientConfigError) Error() string

Error returns the error as a string

func (*DockerClientConfigError) ErrorName

func (err *DockerClientConfigError) ErrorName() string

ErrorName returns the name of the error

type HostConfigError

type HostConfigError struct {
	Msg string
}

HostConfigError represents an error caused by host configuration

func (*HostConfigError) Error

func (err *HostConfigError) Error() string

Error returns the error as a string

func (*HostConfigError) ErrorName

func (err *HostConfigError) ErrorName() string

ErrorName returns the name of the error

type MultiErr

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

MultiErr wraps multiple errors

func (MultiErr) Error

func (me MultiErr) Error() string

Error returns the error string for MultiErr

type NamedError

type NamedError interface {
	error
	ErrorName() string
}

NamedError defines an interface that wraps error and add additional 'ErrorName' method

type ResourceInitError added in v1.19.0

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

ResourceInitError is a task error for which a required resource cannot be initialized

func NewResourceInitError added in v1.19.0

func NewResourceInitError(taskARN string, origErr error) *ResourceInitError

NewResourceInitError creates an error for resource initialize failure

func (*ResourceInitError) Error added in v1.19.0

func (err *ResourceInitError) Error() string

Error returns the error as a string

func (*ResourceInitError) ErrorName added in v1.19.0

func (err *ResourceInitError) ErrorName() string

ErrorName is the name of the error

type Retriable

type Retriable interface {
	// Retry returns true if the operation can be retried
	Retry() bool
}

Retriable defines an interface for retriable methods

func NewRetriable

func NewRetriable(retry bool) Retriable

NewRetriable creates a new DefaultRetriable object

type RetriableError

type RetriableError interface {
	Retriable
	error
}

RetriableError defines an interface for a retriable error

func NewRetriableError

func NewRetriableError(retriable Retriable, err error) RetriableError

NewRetriableError creates a new DefaultRetriableError object

Jump to

Keyboard shortcuts

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