Rename GroupInterval to RepeatInterval

This commit is contained in:
Fabian Reinartz 2015-09-25 00:08:53 +02:00
parent 34527f510e
commit f4b5a7afb4
1 changed files with 9 additions and 9 deletions

View File

@ -74,7 +74,7 @@ func (r *Route) UnmarshalYAML(unmarshal func(interface{}) error) error {
SendTo string `yaml:"send_to,omitempty"` SendTo string `yaml:"send_to,omitempty"`
GroupBy []model.LabelName `yaml:"group_by,omitempty"` GroupBy []model.LabelName `yaml:"group_by,omitempty"`
GroupWait *model.Duration `yaml:"group_wait,omitempty"` GroupWait *model.Duration `yaml:"group_wait,omitempty"`
GroupInterval *model.Duration `yaml:"group_interval,omitempty"` RepeatInterval *model.Duration `yaml:"repeat_interval,omitempty"`
Match map[string]string `yaml:"match,omitempty"` Match map[string]string `yaml:"match,omitempty"`
MatchRE map[string]string `yaml:"match_re,omitempty"` MatchRE map[string]string `yaml:"match_re,omitempty"`
@ -123,8 +123,8 @@ func (r *Route) UnmarshalYAML(unmarshal func(interface{}) error) error {
r.RouteOpts.GroupWait = time.Duration(*v.GroupWait) r.RouteOpts.GroupWait = time.Duration(*v.GroupWait)
r.RouteOpts.hasWait = true r.RouteOpts.hasWait = true
} }
if v.GroupInterval != nil { if v.RepeatInterval != nil {
r.RouteOpts.GroupInterval = time.Duration(*v.GroupInterval) r.RouteOpts.RepeatInterval = time.Duration(*v.RepeatInterval)
r.RouteOpts.hasInterval = true r.RouteOpts.hasInterval = true
} }
r.RouteOpts.SendTo = v.SendTo r.RouteOpts.SendTo = v.SendTo
@ -145,7 +145,7 @@ type RouteOpts struct {
// How long to wait to group matching alerts before sending // How long to wait to group matching alerts before sending
// a notificaiton // a notificaiton
GroupWait time.Duration GroupWait time.Duration
GroupInterval time.Duration RepeatInterval time.Duration
hasWait, hasInterval bool hasWait, hasInterval bool
} }
@ -171,6 +171,6 @@ func (ro *RouteOpts) populateDefault(parent *RouteOpts) {
ro.GroupWait = parent.GroupWait ro.GroupWait = parent.GroupWait
} }
if !ro.hasInterval { if !ro.hasInterval {
ro.GroupInterval = parent.GroupInterval ro.RepeatInterval = parent.RepeatInterval
} }
} }