errors

package
v1.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PushImageErr = "could not push image"
	// Error Prefix matches error thrown by Docker
	// See https://github.com/moby/moby/blob/master/client/errors.go#L18
	DockerConnectionFailed = ".*(Cannot connect to the Docker daemon.*) Is"

	// Build cancelled due to other build failures
	BuildCancelled = ".*context canceled.*"
)
View Source
const (
	// These are phases in a Skaffolld
	Init        = Phase("Init")
	Build       = Phase("Build")
	Deploy      = Phase("Deploy")
	StatusCheck = Phase("StatusCheck")
	FileSync    = Phase("FileSync")
	DevInit     = Phase("DevInit")
	Cleanup     = Phase("Cleanup")
)

Variables

This section is empty.

Functions

func ActionableErr

func ActionableErr(phase Phase, err error) *proto.ActionableErr

ActionableErr returns an actionable error message with suggestions

func IsOldImageManifestProblem

func IsOldImageManifestProblem(err error) (string, bool)

func IsSkaffoldErr

func IsSkaffoldErr(err error) bool

func SetSkaffoldOptions

func SetSkaffoldOptions(opts config.SkaffoldOptions)

SetSkaffoldOptions set Skaffold config options once. These options are used later to suggest actionable error messages based on skaffold run context

func ShowAIError

func ShowAIError(err error) error

Types

type ErrDef

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

func NewError

func NewError(err error, ae proto.ActionableErr) ErrDef

NewError creates an actionable error message preserving the actual error.

func NewErrorWithStatusCode

func NewErrorWithStatusCode(ae proto.ActionableErr) ErrDef

NewError creates an actionable error message.

func (ErrDef) Error

func (e ErrDef) Error() string

func (ErrDef) StatusCode

func (e ErrDef) StatusCode() proto.StatusCode

func (ErrDef) Suggestions

func (e ErrDef) Suggestions() []*proto.Suggestion

func (ErrDef) Unwrap

func (e ErrDef) Unwrap() error

type Error

type Error interface {
	Error() string
	StatusCode() proto.StatusCode
	Suggestions() []*proto.Suggestion
	Unwrap() error
}

type Phase

type Phase string

Jump to

Keyboard shortcuts

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