From db71e06610d3987e8455716a514a8db54e713386 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Mon, 3 Jun 2024 14:06:07 -0400 Subject: [PATCH] include both warning and limits globals (#606) --- controller/limits/limitClasses.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/controller/limits/limitClasses.go b/controller/limits/limitClasses.go index 24f319dc..e6a22c19 100644 --- a/controller/limits/limitClasses.go +++ b/controller/limits/limitClasses.go @@ -11,13 +11,18 @@ type configBandwidthClass struct { limitAction store.LimitAction } -func newConfigBandwidthClasses(cfgClass *BandwidthPerPeriod) []store.BandwidthClass { +func newConfigBandwidthClasses(cfg *BandwidthPerPeriod) []store.BandwidthClass { return []store.BandwidthClass{ &configBandwidthClass{ - periodInMinutes: int(cfgClass.Period.Minutes()), - bw: cfgClass.Warning, + periodInMinutes: int(cfg.Period.Minutes()), + bw: cfg.Warning, limitAction: store.WarningLimitAction, }, + &configBandwidthClass{ + periodInMinutes: int(cfg.Period.Minutes()), + bw: cfg.Limit, + limitAction: store.LimitLimitAction, + }, } }