errors

package
v1.1.102 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 8 modules, 10 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitServicesNotReady      = New(1001, "failed to initialize. Services are not ready")
	ErrStartingAgentStatusUpdate = Newf(1004, "error starting %s update")
	ErrStartingVersionChecker    = Newf(1005, "%s. No version to compare for upgrade")
	ErrGrpcConnection            = New(1007, "grpc client is not connected to central")
	ErrHarvesterConnection       = New(1008, "harvester client is not connected to central")
)

Generic Agent Errors

Functions

This section is empty.

Types

type AgentError

type AgentError struct {
	Code    int    `json:"code" structs:"code,omitempty"`
	Message string `json:"message" structs:"message,omitempty"`
	// contains filtered or unexported fields
}

AgentError - Agent Error

func New

func New(errCode int, errMessage string) *AgentError

New - Creates a new Agent Error

func Newf

func Newf(errCode int, errMessage string) *AgentError

Newf - Creates a new formatted Agent Error

func Wrap

func Wrap(agentError *AgentError, info string) *AgentError

Wrap -add additional data to a defined error

func (*AgentError) Error

func (e *AgentError) Error() string

Error - Returns the formatted error message

func (*AgentError) FormatError

func (e *AgentError) FormatError(args ...interface{}) error

FormatError - Creates a Error with applied formatting

func (*AgentError) GetErrorCode

func (e *AgentError) GetErrorCode() int

GetErrorCode - Returns the error code

Jump to

Keyboard shortcuts

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