datadog

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyAPIKey empty APIKey error
	ErrEmptyAPIKey = errors.New("empty api key")
)

Functions

This section is empty.

Types

type ConditionCommon added in v1.0.0

type ConditionCommon struct {
	ConditionType  string
	Status         bool
	LastUpdateTime metav1.Time
	Reason         string
	Message        string
}

ConditionCommon defines a common struct for the Status Condition

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, v2Enabled bool, platformInfo *kubernetes.PlatformInfo) *ForwardersManager

NewForwardersManager builds a new ForwardersManager object ForwardersManager implements the controller-runtime Runnable interface

func (*ForwardersManager) MetricsForwarderStatusForObj

func (f *ForwardersManager) MetricsForwarderStatusForObj(obj MonitoredObject) *ConditionCommon

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 client.Object)

Register starts a new metricsForwarder if a new MonitoredObject is detected

func (*ForwardersManager) SetEnabledFeatures added in v1.1.0

func (f *ForwardersManager) SetEnabledFeatures(dda MonitoredObject, features []feature.Feature)

SetEnabledFeatures updates the list of enabled features for a namespaced object

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(client.Object)
	Unregister(MonitoredObject)
	ProcessError(MonitoredObject, error)
	ProcessEvent(MonitoredObject, Event)
	MetricsForwarderStatusForObj(obj MonitoredObject) *ConditionCommon
	SetEnabledFeatures(obj MonitoredObject, features []feature.Feature)
}

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