Documentation ¶
Index ¶
- Variables
- type Component
- type Datadog
- type Option
- func WithAccessorGetFn(component types.Component, fn func(int) (json.RawMessage, error)) Option
- func WithAccessorUpdateFn(component types.Component, fn func(json.RawMessage) error) Option
- func WithMonitorGetFn(fn func(int, bool) (*client.MonitorWithDependencies, error)) Option
- func WithMonitorSetFn(fn func(*client.MonitorWithDependencies) error) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilFunction is returned if the passed parameter is nil. ErrNilFunction = errors.New("nil argument function") // ErrInvalidFunctionType is returned if the function does not have the correct signature. ErrInvalidFunctionType = errors.New("invalid function type") )
View Source
var ( // ErrInvalidComponentTypeID is returned when invalid type ID is used. ErrInvalidComponentTypeID = errors.New("invalid component type ID") )
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Type types.Component `json:"type"` Dashboard json.RawMessage `json:"dashboard,omitempty"` Monitor *client.MonitorWithDependencies `json:"monitor,omitempty"` Downtime json.RawMessage `json:"downtime,omitempty"` ScreenBoard json.RawMessage `json:"screenboard,omitempty"` }
Component represents a structure of a watchdog component which holds one of datadog component (dashboard, monitor etc.)
type Datadog ¶
Datadog is a abstraction over datadog api library. The abstraction provides simplified interface to query datadog API.
type Option ¶
Option is a functional parameter interface for datadog constructor
func WithAccessorGetFn ¶
WithAccessorGetFn is a functional parameter to set the get functions.
func WithAccessorUpdateFn ¶
WithAccessorUpdateFn is a functional parameter to set the update functions.
func WithMonitorGetFn ¶
WithMonitorGetFn is a functional parameter to set the dashboard get function.
func WithMonitorSetFn ¶
func WithMonitorSetFn(fn func(*client.MonitorWithDependencies) error) Option
WithMonitorSetFn is a functional parameter that sets the update monitor function.
Click to show internal directories.
Click to hide internal directories.