Documentation
¶
Index ¶
Constants ¶
View Source
const ( RecordPrefix = "osko" TypeTotal = "total" TypeBad = "bad" TypeGood = "good" TypeMeasurement = "sli_measurement" ExprFmt = "sum(increase(%s[%s]))" )
Variables ¶
This section is empty.
Functions ¶
func CreateSLIMeasurement ¶
func CreateSLIMeasurement(m MetricLabel, goodRule monitoringv1.Rule, totalRule monitoringv1.Rule) monitoringv1.Rule
Types ¶
type BudgetRule ¶
type BudgetRule struct { Record string Sli *openslov1.SLI Slo *openslov1.SLO TotalRuleConfig *Rule BadRuleConfig *Rule GoodRuleConfig *Rule TargetRuleConfig *Rule }
func (BudgetRule) NewBudgetRule ¶
func (b BudgetRule) NewBudgetRule() (budgetRule monitoringv1.Rule, sliMeasurement monitoringv1.Rule)
type DataSourceConfig ¶
type DataSourceConfig struct {
DataSource *openslov1.Datasource
}
func (DataSourceConfig) ParseTenantAnnotation ¶
func (d DataSourceConfig) ParseTenantAnnotation() (tenants []string)
type MetricLabel ¶
type MetricLabel struct { Slo *openslov1.SLO Sli *openslov1.SLI TimeWindow string Labels map[string]string }
func (MetricLabel) NewMetricLabelCompiler ¶
func (m MetricLabel) NewMetricLabelCompiler(rule *monitoringv1.Rule, window string) string
func (MetricLabel) NewMetricLabelGenerator ¶
func (m MetricLabel) NewMetricLabelGenerator() map[string]string
type Rule ¶
type Rule struct { Sli *openslov1.SLI Slo *openslov1.SLO BaseRule *monitoringv1.Rule RuleType string Record string Expr string RateWindow string TimeWindow string SupportiveRule *Rule MetricLabelCompiler *MetricLabel }
func (Rule) NewRatioRule ¶
func (c Rule) NewRatioRule(window string) (*monitoringv1.Rule, *monitoringv1.Rule)
func (Rule) NewSupportiveRule ¶
func (c Rule) NewSupportiveRule(baseRule monitoringv1.Rule) (rule monitoringv1.Rule)
func (Rule) NewTargetRule ¶
func (c Rule) NewTargetRule() (rule monitoringv1.Rule)
Click to show internal directories.
Click to hide internal directories.