Documentation ¶
Index ¶
- Variables
- type Event
- type EventType
- type ForwardersManager
- func (f *ForwardersManager) MetricsForwarderStatusForObj(obj MonitoredObject) *datadoghqv1alpha1.DatadogAgentCondition
- func (f *ForwardersManager) ProcessError(obj MonitoredObject, reconcileErr error)
- func (f *ForwardersManager) ProcessEvent(obj MonitoredObject, event Event)
- func (f *ForwardersManager) Register(obj MonitoredObject)
- func (f *ForwardersManager) Start(stop <-chan struct{}) error
- func (f *ForwardersManager) Unregister(obj MonitoredObject)
- type MetricForwardersManager
- type MonitoredObject
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyAPIKey empty APIKey error ErrEmptyAPIKey = errors.New("empty api key") // ErrEmptyAPPKey empty APPKey error ErrEmptyAPPKey = errors.New("empty app key") )
Functions ¶
This section is empty.
Types ¶
type EventType ¶
type EventType string
EventType enumerates the possible event types to be sent
const ( // CreationEvent should be used for resource creation events CreationEvent EventType = "Create" // DetectionEvent should be used for resource detection events DetectionEvent EventType = "Detect" // UpdateEvent should be used for resource update events UpdateEvent EventType = "Update" // DeletionEvent should be used for resource deletion events DeletionEvent EventType = "Delete" )
type ForwardersManager ¶
ForwardersManager is a collection of metricsForwarder per DatadogAgent ForwardersManager implements the controller-runtime Runnable interface
func NewForwardersManager ¶
func NewForwardersManager(k8sClient client.Client) *ForwardersManager
NewForwardersManager builds a new ForwardersManager ForwardersManager implements the controller-runtime Runnable interface
func (*ForwardersManager) MetricsForwarderStatusForObj ¶
func (f *ForwardersManager) MetricsForwarderStatusForObj(obj MonitoredObject) *datadoghqv1alpha1.DatadogAgentCondition
MetricsForwarderStatusForObj used to retrieve the Metrics forwarder status for a given object
func (*ForwardersManager) ProcessError ¶
func (f *ForwardersManager) ProcessError(obj MonitoredObject, reconcileErr error)
ProcessError dispatches reconcile errors to their corresponding metric forwarders metric forwarders generates reconcile loop metrics based on the errors
func (*ForwardersManager) ProcessEvent ¶
func (f *ForwardersManager) ProcessEvent(obj MonitoredObject, event Event)
ProcessEvent dispatches recorded events to their corresponding metric forwarders
func (*ForwardersManager) Register ¶
func (f *ForwardersManager) Register(obj MonitoredObject)
Register starts a new metricsForwarder if a new MonitoredObject is detected
func (*ForwardersManager) Start ¶
func (f *ForwardersManager) Start(stop <-chan struct{}) error
Start must be handled by the controller-runtime manager
func (*ForwardersManager) Unregister ¶
func (f *ForwardersManager) Unregister(obj MonitoredObject)
Unregister stops a metricsForwarder when its corresponding MonitoredObject is deleted
type MetricForwardersManager ¶ added in v0.4.0
type MetricForwardersManager interface { Register(MonitoredObject) Unregister(MonitoredObject) ProcessError(MonitoredObject, error) ProcessEvent(MonitoredObject, Event) MetricsForwarderStatusForObj(obj MonitoredObject) *datadoghqv1alpha1.DatadogAgentCondition }
MetricForwardersManager defines interface for metrics forwarding
type MonitoredObject ¶
MonitoredObject must be implemented by the monitored object (e.g DatadogAgent)