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
Click to show internal directories.
Click to hide internal directories.