forked from LinTechSo/sloth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noop.go
34 lines (23 loc) 路 1.12 KB
/
noop.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package generate
import (
"context"
"github.com/prometheus/prometheus/model/rulefmt"
"github.com/jonas27/sloth/internal/alert"
"github.com/jonas27/sloth/internal/info"
"github.com/jonas27/sloth/internal/prometheus"
)
type noopSLIRecordingRulesGenerator bool
const NoopSLIRecordingRulesGenerator = noopSLIRecordingRulesGenerator(false)
func (noopSLIRecordingRulesGenerator) GenerateSLIRecordingRules(ctx context.Context, slo prometheus.SLO, alerts alert.MWMBAlertGroup) ([]rulefmt.Rule, error) {
return nil, nil
}
type noopMetadataRecordingRulesGenerator bool
const NoopMetadataRecordingRulesGenerator = noopMetadataRecordingRulesGenerator(false)
func (noopMetadataRecordingRulesGenerator) GenerateMetadataRecordingRules(ctx context.Context, info info.Info, slo prometheus.SLO, alerts alert.MWMBAlertGroup) ([]rulefmt.Rule, error) {
return nil, nil
}
type noopSLOAlertRulesGenerator bool
const NoopSLOAlertRulesGenerator = noopSLOAlertRulesGenerator(false)
func (noopSLOAlertRulesGenerator) GenerateSLOAlertRules(ctx context.Context, slo prometheus.SLO, alerts alert.MWMBAlertGroup) ([]rulefmt.Rule, error) {
return nil, nil
}