event

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterEvent

type CounterEvent struct {
	CMetricName string
	CValue      float64
	CLabels     map[string]string
}

func (*CounterEvent) Labels

func (c *CounterEvent) Labels() map[string]string

func (*CounterEvent) MetricName

func (c *CounterEvent) MetricName() string

func (*CounterEvent) MetricType

func (c *CounterEvent) MetricType() mapper.MetricType

func (*CounterEvent) Value

func (c *CounterEvent) Value() float64

func (*CounterEvent) Values added in v0.29.0

func (c *CounterEvent) Values() []float64

type Event

type Event interface {
	MetricName() string
	Value() float64
	Labels() map[string]string
	MetricType() mapper.MetricType
}

type EventHandler

type EventHandler interface {
	Queue(event Events)
}

type EventQueue

type EventQueue struct {
	C chan Events
	// contains filtered or unexported fields
}

func NewEventQueue

func NewEventQueue(c chan Events, flushThreshold int, flushInterval time.Duration, eventsFlushed prometheus.Counter) *EventQueue

func (*EventQueue) Flush

func (eq *EventQueue) Flush()

func (*EventQueue) FlushUnlocked

func (eq *EventQueue) FlushUnlocked()

func (*EventQueue) Len

func (eq *EventQueue) Len() int

func (*EventQueue) Queue

func (eq *EventQueue) Queue(events Events)

type Events

type Events []Event

type ExpandableEvent added in v0.29.0

type ExpandableEvent interface {
	Expand() []Event
}

type GaugeEvent

type GaugeEvent struct {
	GMetricName string
	GValue      float64
	GRelative   bool
	GLabels     map[string]string
}

func (*GaugeEvent) Labels

func (g *GaugeEvent) Labels() map[string]string

func (*GaugeEvent) MetricName

func (g *GaugeEvent) MetricName() string

func (*GaugeEvent) MetricType

func (g *GaugeEvent) MetricType() mapper.MetricType

func (*GaugeEvent) Value

func (g *GaugeEvent) Value() float64

func (*GaugeEvent) Values added in v0.29.0

func (g *GaugeEvent) Values() []float64

type MultiObserverEvent added in v0.29.0

type MultiObserverEvent struct {
	OMetricName string
	OValues     []float64 // DataDog extensions allow multiple values in a single sample
	OLabels     map[string]string
	SampleRate  float64
}

func (*MultiObserverEvent) Expand added in v0.29.0

func (m *MultiObserverEvent) Expand() []Event

Expand returns a list of events that are the result of expanding the multi-value event. This will be used as a middle-step in the pipeline to convert multi-value events to single-value events. And keep the exporter code compatible with previous versions.

func (*MultiObserverEvent) Labels added in v0.29.0

func (m *MultiObserverEvent) Labels() map[string]string

func (*MultiObserverEvent) MetricName added in v0.29.0

func (m *MultiObserverEvent) MetricName() string

func (*MultiObserverEvent) MetricType added in v0.29.0

func (m *MultiObserverEvent) MetricType() mapper.MetricType

func (*MultiObserverEvent) Value added in v0.29.0

func (m *MultiObserverEvent) Value() float64

func (*MultiObserverEvent) Values added in v0.29.0

func (m *MultiObserverEvent) Values() []float64

type MultiValueEvent added in v0.29.0

type MultiValueEvent interface {
	MetricName() string
	Labels() map[string]string
	MetricType() mapper.MetricType
	Values() []float64
}

MultiValueEvent is an event that contains multiple values, it is going to replace the existing Event interface.

type ObserverEvent added in v0.17.0

type ObserverEvent struct {
	OMetricName string
	OValue      float64
	OLabels     map[string]string
}

func (*ObserverEvent) Labels added in v0.17.0

func (o *ObserverEvent) Labels() map[string]string

func (*ObserverEvent) MetricName added in v0.17.0

func (o *ObserverEvent) MetricName() string

func (*ObserverEvent) MetricType added in v0.17.0

func (o *ObserverEvent) MetricType() mapper.MetricType

func (*ObserverEvent) Value added in v0.17.0

func (o *ObserverEvent) Value() float64

func (*ObserverEvent) Values added in v0.29.0

func (o *ObserverEvent) Values() []float64

type UnbufferedEventHandler

type UnbufferedEventHandler struct {
	C chan Events
}

func (*UnbufferedEventHandler) Queue

func (ueh *UnbufferedEventHandler) Queue(events Events)

Jump to

Keyboard shortcuts

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