include both warning and limits globals (#606)

This commit is contained in:
Michael Quigley 2024-06-03 14:06:07 -04:00
parent 8a255a0ee8
commit db71e06610
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -11,13 +11,18 @@ type configBandwidthClass struct {
limitAction store.LimitAction limitAction store.LimitAction
} }
func newConfigBandwidthClasses(cfgClass *BandwidthPerPeriod) []store.BandwidthClass { func newConfigBandwidthClasses(cfg *BandwidthPerPeriod) []store.BandwidthClass {
return []store.BandwidthClass{ return []store.BandwidthClass{
&configBandwidthClass{ &configBandwidthClass{
periodInMinutes: int(cfgClass.Period.Minutes()), periodInMinutes: int(cfg.Period.Minutes()),
bw: cfgClass.Warning, bw: cfg.Warning,
limitAction: store.WarningLimitAction, limitAction: store.WarningLimitAction,
}, },
&configBandwidthClass{
periodInMinutes: int(cfg.Period.Minutes()),
bw: cfg.Limit,
limitAction: store.LimitLimitAction,
},
} }
} }