Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoSLORules will be used when there are no rules to store. The upper layer // could ignore or handle the error in cases where there wasn't an output. ErrNoSLORules = fmt.Errorf("0 SLO Prometheus rules generated") )
View Source
var YAMLSpecLoader = yamlSpecLoader{ // contains filtered or unexported fields }
YAMLSpecLoader knows how to load Kubernetes ServiceLevel YAML specs and converts them to a model.
Functions ¶
This section is empty.
Types ¶
type IOWriterPrometheusOperatorYAMLRepo ¶
type IOWriterPrometheusOperatorYAMLRepo struct {
// contains filtered or unexported fields
}
IOWriterPrometheusOperatorYAMLRepo knows to store all the SLO rules (recordings and alerts) grouped in an IOWriter in Kubernetes prometheus operator YAML format.
func NewIOWriterPrometheusOperatorYAMLRepo ¶
func NewIOWriterPrometheusOperatorYAMLRepo(writer io.Writer, logger log.Logger) IOWriterPrometheusOperatorYAMLRepo
func (IOWriterPrometheusOperatorYAMLRepo) StoreSLOs ¶
func (i IOWriterPrometheusOperatorYAMLRepo) StoreSLOs(ctx context.Context, kmeta K8sMeta, slos []StorageSLO) error
type K8sMeta ¶
type K8sMeta struct {
Name string `validate:"required"`
Namespace string
Annotations map[string]string
Labels map[string]string
}
K8sMeta is the Kubernetes metadata simplified.
type SLOGroup ¶
type SLOGroup struct {
K8sMeta K8sMeta
prometheus.SLOGroup
}
SLOGroup is a Kubernetes SLO group. Is created based on a regular Prometheus SLO model and Kubernetes data.
type StorageSLO ¶
type StorageSLO struct {
SLO prometheus.SLO
Rules prometheus.SLORules
}
Click to show internal directories.
Click to hide internal directories.