errors

package
v1.4.47 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitializeDataPlane     = "InitializeDataPlane"
	BootupDataplane         = "BootupDataplane"
	BootupPolicyMgr         = "BootupPolicyManager"
	ResetIPSets             = "ResetIPSets"
	CreateIPSet             = "CreateIPSet"
	AppendIPSet             = "AppendIPSet"
	DeleteIPSet             = "DeleteIPSet"
	DestroyIPSet            = "DestroyIPSet"
	TestIPSet               = "TestIPSet"
	IPSetIntersection       = "IPSetIntersection"
	AddPolicy               = "AddNetworkPolicy"
	RemovePolicy            = "RemovePolicy"
	GetSelectorReference    = "GetSelectorReference"
	AddSelectorReference    = "AddSelectorReference"
	DeleteSelectorReference = "DeleteSelectorReference"
	AddNetPolReference      = "AddNetPolReference"
	DeleteNetPolReference   = "DeleteNetPolReference"
	RunFileCreator          = "RunCommandWithFile"
	AddPod                  = "AddPod"
)

Error labels for ipsetmanager

View Source
const (
	SetCannotBeDestroyedInUseByKernelComponent = 1
	ElemSeperatorNotSupported                  = 2
	SetWithGivenNameDoesNotExist               = 3
	SecondElementIsMissing                     = 4
	MissingSecondMandatoryArgument             = 5
	MaximalNumberOfSetsReached                 = 6
	IPSetWithGivenNameAlreadyExists            = 7
	SetToBeAddedDeletedTestedDoesNotExist      = 8
	Unknown                                    = 999
)

Error codes for ipsetmanager

Variables

View Source
var (
	// ErrSrcNotSpecified thrown during NPM debug cli mode when the source packet is not specified
	ErrSrcNotSpecified = errors.New("source not specified")

	// ErrDstNotSpecified thrown during NPM debug cli mode when the source packet is not specified
	ErrDstNotSpecified = errors.New("destination not specified")
)

Functions

This section is empty.

Types

type NPMError

type NPMError struct {
	OperationAction string
	IsRetriable     bool
	FullCmd         []string
	ErrID           int
	Err             error
}

func ConvertToNPMError

func ConvertToNPMError(operationFlag string, err error, cmd []string) *NPMError

func Error

func Error(operation string, isRetriable bool, err error) *NPMError

func ErrorWrapper

func ErrorWrapper(operation string, isRetriable bool, errstring string, err error) *NPMError

func Errorf

func Errorf(operation string, isRetriable bool, errstring string) *NPMError

func (*NPMError) Error

func (n *NPMError) Error() string

type NPMSimpleError

type NPMSimpleError struct {
	Err error
}

NPMSimpleError and its methods are used to appease go lint

func SimpleError

func SimpleError(errstring string) *NPMSimpleError

func SimpleErrorWrapper

func SimpleErrorWrapper(errstring string, err error) *NPMSimpleError

func (*NPMSimpleError) Error

func (n *NPMSimpleError) Error() string

Jump to

Keyboard shortcuts

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