errors

package
v0.0.0-...-5655933 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the specified error was created by NewNotFound.

func IsPartial

func IsPartial(err error) bool

IsPartial returns true if the specified error was created by NewPartial.

func IsRetriable

func IsRetriable(err error) bool

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 NewNotFound

func NewNotFound(notFoundObject string) *AgentError

NewNotFound returns a new error which indicates that the object passed in parameter was not found.

func NewPartial

func NewPartial(partialObj interface{}) *AgentError

NewPartial returns a new error which indicates that the object passed in parameter couldn't be fetched completely and that the query should be retried.

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 (AgentError) Error

func (e AgentError) Error() string

Error satisfies the error interface

Jump to

Keyboard shortcuts

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