datadog

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 Event

type Event struct {
	Title string
	Type  EventType
}

Event contains the rquired information to send Datadog events

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

type ForwardersManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

type MonitoredObject interface {
	GetNamespace() string
	GetName() string
}

MonitoredObject must be implemented by the monitored object (e.g DatadogAgent)

Jump to

Keyboard shortcuts

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