From b1bfa40c330a2d9c96463279883a9ce32cd5a3ee Mon Sep 17 00:00:00 2001 From: gotjosh Date: Thu, 12 Oct 2023 15:45:42 +0100 Subject: [PATCH] appease the linter and clear todos Signed-off-by: gotjosh --- notify/notify.go | 1 - timeinterval/timeinterval.go | 2 ++ types/types.go | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/notify/notify.go b/notify/notify.go index 672c5a6ac5..25e83b3780 100644 --- a/notify/notify.go +++ b/notify/notify.go @@ -869,7 +869,6 @@ func (n SetNotifiesStage) Exec(ctx context.Context, l log.Logger, alerts ...*typ type timeStage struct { muter types.TimeMuter - //Times map[string][]timeinterval.TimeInterval } type TimeMuteStage timeStage diff --git a/timeinterval/timeinterval.go b/timeinterval/timeinterval.go index a160189aff..fe8c97d729 100644 --- a/timeinterval/timeinterval.go +++ b/timeinterval/timeinterval.go @@ -27,6 +27,8 @@ import ( "gopkg.in/yaml.v2" ) +// Intervener determines whether a given time and active route time interval should mute outgoing notifications. +// It implements the TimeMuter interface. type Intervener struct { intervals map[string][]TimeInterval } diff --git a/types/types.go b/types/types.go index 36306781d9..b427a3d1d3 100644 --- a/types/types.go +++ b/types/types.go @@ -381,9 +381,8 @@ type Muter interface { Mutes(model.LabelSet) bool } -// TODO +// TimeMuter determines if alerts should be muted based on the specified current time and active time interval on the route. type TimeMuter interface { - //TODO: I don't think this should return an error but let's keep it consistent for now. Mutes(timeIntervalName []string, now time.Time) (bool, error) }