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") ErrRegisterSubscriptionWebhook = New(1006, "unable to register subscription webhook") 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 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
Click to show internal directories.
Click to hide internal directories.