models

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetMetricsInput

type GetMetricsInput struct {
	MetricNames     []string  `json:"metricNames" validate:"required"`
	Namespace       string    `json:"namespace"`
	FromDate        time.Time `json:"fromDate" validate:"required"`
	ToDate          time.Time `json:"toDate" validate:"required,gtfield=FromDate"`
	IntervalMinutes int64     `json:"intervalMinutes" validate:"required,gt=0"`
}

GetMetricsInput is used to request data points for a number of metrics over a given time frame

type GetMetricsOutput

type GetMetricsOutput struct {
	EventsProcessed  *MetricResult `json:"eventsProcessed,omitempty"`
	TotalAlertsDelta *MetricResult `json:"totalAlertsDelta,omitempty"`
	AlertsBySeverity *MetricResult `json:"alertsBySeverity,omitempty"`
	FromDate         time.Time     `json:"fromDate"`
	ToDate           time.Time     `json:"toDate"`
	IntervalMinutes  int64         `json:"intervalMinutes"`
}

GetMetricsOutput contains data points for a number of metrics over the specified time frame

type LambdaInput

type LambdaInput struct {
	GetMetrics *GetMetricsInput `json:"getMetrics"`
}

LambdaInput is the collection of all possible args to the Lambda function.

type MetricResult

type MetricResult = struct {
	SingleValue []SingleMetric   `json:"singleValue,omitempty"`
	SeriesData  TimeSeriesMetric `json:"seriesData,omitempty"`
}

MetricResult is either a single data point or a series of timestamped data points

type SingleMetric

type SingleMetric struct {
	Label *string  `json:"label"`
	Value *float64 `json:"value"`
}

type TimeSeriesMetric

type TimeSeriesMetric struct {
	Timestamps []*time.Time       `json:"timestamps"`
	Series     []TimeSeriesValues `json:"series"`
}

TimeSeriesResponse contains the pertinent fields from the GetMetricData response to be passed back to the frontend

type TimeSeriesValues

type TimeSeriesValues struct {
	Label  *string    `json:"label"`
	Values []*float64 `json:"values"`
}

Jump to

Keyboard shortcuts

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