models

package
v0.0.0-...-2790e15 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Status      string
	Labels      Labels
	StartsAt    time.Time
	EndsAt      time.Time
	Fingerprint string
}

func (*Alert) AsBigQueryAlert

func (a *Alert) AsBigQueryAlert() (BigQueryAlert, error)

type AlertRequest

type AlertRequest struct {
	Receiver string
	Status   string
	Alerts   []Alert
}

func (*AlertRequest) ToBigQuery

func (ar *AlertRequest) ToBigQuery() ([]BigQueryAlert, error)

type BigQueryAlert

type BigQueryAlert struct {
	Alertname   string
	Receiver    string
	App         string
	Namespace   string
	StartsAt    civil.DateTime        `bigquery:"starts_at"`
	EndsAt      bigquery.NullDateTime `bigquery:"ends_at"`
	Status      string
	Fingerprint string
	Cluster     string
}

type Labels

type Labels struct {
	Alert          string
	Alertname      string `json:"alertname"`
	Namespace      string `json:"namespace"`
	Deployment     string `json:"deployment"`
	App            string `json:"app"`
	LogApp         string `json:"log_app"`
	KubernetesName string `json:"kubernetes_name"`
	Cluster        string `json:"tenant_cluster"`
}

Jump to

Keyboard shortcuts

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