fail

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultExitCode         = 1
	RuntimeErrorExitCode    = 10
	EtcdErrorExitCode       = 11
	KubeClientErrorExitCode = 12
	SSHErrorExitCode        = 13
	ConnectionErrorExitCode = 14
	ConfigErrorExitCode     = 15
	ExecErrorExitCode       = 16
)

Variables

This section is empty.

Functions

func Config

func Config(err error, op string) error

func ConfigValidation

func ConfigValidation(err error) error

ConfigValidation is a shortcut to quickly construct ConfigError

func Connection

func Connection(err error, target string) error

Connection is a shortcut to quickly construct ConnectionError

func Etcd

func Etcd(err error, op string, args ...interface{}) error

Etcd is a shortcut to quickly construct EtcdError

func ExitCode

func ExitCode(err error) int

func KubeClient

func KubeClient(err error, op string, args ...interface{}) error

KubeClient is a shortcut to quickly construct KubeClientError

func NewConfigError

func NewConfigError(op string, format string, args ...interface{}) error

func NewRuntimeError

func NewRuntimeError(op string, format string, args ...interface{}) error

func NoKubeClient

func NoKubeClient() error

NoKubeClient is a shortcut to quickly construct KubeClientError with predefined not initialized error

func Runtime

func Runtime(err error, op string, args ...interface{}) error

Runtime is a shortcut to quickly construct RuntimeError

func SSH

func SSH(err error, op string, args ...interface{}) error

SSH is a shortcut to quickly construct SSHError

Types

type ConfigError

type ConfigError struct {
	Err error
	Op  string
}

ConfigError wraps configuration related errors

func (ConfigError) Error

func (e ConfigError) Error() string

func (ConfigError) Unwrap

func (e ConfigError) Unwrap() error

type ConnectionError

type ConnectionError struct {
	Err    error
	Target string
}

ConnectionError wraps connections related errors

func (ConnectionError) Error

func (e ConnectionError) Error() string

func (ConnectionError) Unwrap

func (e ConnectionError) Unwrap() error

type CredentialsError

type CredentialsError struct {
	Err      error
	Op       string
	Provider string
}

CredentialsError wraps cloud provider credentials related errors

func (CredentialsError) Error

func (e CredentialsError) Error() string

func (CredentialsError) Unwrap

func (e CredentialsError) Unwrap() error

type EtcdError

type EtcdError struct {
	Err error
	Op  string
}

EtcdError wraps etcd client related errors

func (EtcdError) Error

func (e EtcdError) Error() string

func (EtcdError) Unwrap

func (e EtcdError) Unwrap() error

type ExecError

type ExecError struct {
	Err    error
	Op     string
	Cmd    string
	Stderr string
}

ExecError wraps SSH related errors

func (ExecError) Error

func (e ExecError) Error() string

func (ExecError) Unwrap

func (e ExecError) Unwrap() error

type KubeClientError

type KubeClientError struct {
	Err error
	Op  string
}

KubeClientError wraps kubernetes client related errors

func (KubeClientError) Error

func (e KubeClientError) Error() string

func (KubeClientError) Unwrap

func (e KubeClientError) Unwrap() error

type RuntimeError

type RuntimeError struct {
	Err error
	Op  string
}

RuntimeError wraps kubernetes client related errors

func (RuntimeError) Error

func (e RuntimeError) Error() string

func (RuntimeError) Unwrap

func (e RuntimeError) Unwrap() error

type SSHError

type SSHError struct {
	Err    error
	Op     string
	Cmd    string
	Stderr string
}

SSHError wraps SSH related errors

func (SSHError) Error

func (e SSHError) Error() string

func (SSHError) Unwrap

func (e SSHError) Unwrap() error

Jump to

Keyboard shortcuts

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