Documentation
¶
Overview ¶
Package errors provides custom errors for the agent
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDisabled ¶
IsDisabled returns true if the specified error was created by NewDisabled.
func IsNotFound ¶
IsNotFound returns true if the specified error was created by NewNotFound.
func IsRemoteService ¶
IsRemoteService returns true if the specified error was created by NewRemoteServiceError.
func IsRetriable ¶
IsRetriable returns true if the specified error was created by NewRetriable.
Types ¶
type AgentError ¶
type AgentError struct {
// contains filtered or unexported fields
}
AgentError is an error intended for consumption by a datadog pkg; it can also be reconstructed by clients from an error response. Public to allow easy type switches.
func NewDisabled ¶
func NewDisabled(component, reason string) *AgentError
NewDisabled returns a new error which indicates that a particular Agent component is disabled.
func NewNotFound ¶
func NewNotFound(notFoundObject string) *AgentError
NewNotFound returns a new error which indicates that the object passed in parameter was not found.
func NewRemoteServiceError ¶
func NewRemoteServiceError(target, status string) *AgentError
NewRemoteServiceError returns a new error which indicates that a remote service queried by the Agent is unavailable (e.g the Datadog Cluster Agent returning 500s). The status string can provide additional context (e.g a http response status "500 Internal Server Error").
func NewRetriable ¶
func NewRetriable(retriableObj interface{}, err error) *AgentError
NewRetriable returns a new error which indicates that the object passed in parameter couldn't be fetched and that the query can be retried.
func NewTimeoutError ¶
func NewTimeoutError(target string, err error) *AgentError
NewTimeoutError returns a new error which was caused by a timeout.