eventprocessing

package
v0.0.0-...-ac38171 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventValue

type EventValue struct {
	Timestamp string            `json:"timestamp"`
	Entity    *corev2.Entity    `json:"entity"`
	Check     *corev2.Check     `json:"check"`
	Metrics   *corev2.Metrics   `json:"namespace"`
	Metadata  corev2.ObjectMeta `json:"metadata"`
}

EventValue represents the format of events to send

func ParseEventTimestamp

func ParseEventTimestamp(event *corev2.Event) (EventValue, error)

ParseEventTimestamp returns the event timestamp in a string format

type MetricValue

type MetricValue struct {
	Timestamp string   `json:"timestamp"`
	Name      string   `json:"name"`
	Entity    string   `json:"entity"`
	Value     float64  `json:"value"`
	Namespace string   `json:"namespace"`
	Tags      []string `json:"tags"`
}

MetricValue represents the format of metrics to send

func GetMetricFromPoint

func GetMetricFromPoint(point *corev2.MetricPoint, entityID string, namespaceID string, entityLabels map[string]string, pointNameAsMetricName bool) (MetricValue, error)

GetMetricFromPoint extracts the metrics points into a MetricValue type

Jump to

Keyboard shortcuts

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