From cbb9e2d3f04e06365bfe42769f02c8b667ce531d Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 8 May 2023 19:03:38 +0200 Subject: [chore/performance] Make sender multiplier configurable (#1750) --- internal/config/helpers.gen.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'internal/config/helpers.gen.go') diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index e35eb0665..236d1ea36 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -2124,6 +2124,31 @@ func GetAdvancedThrottlingRetryAfter() time.Duration { return global.GetAdvanced // SetAdvancedThrottlingRetryAfter safely sets the value for global configuration 'AdvancedThrottlingRetryAfter' field func SetAdvancedThrottlingRetryAfter(v time.Duration) { global.SetAdvancedThrottlingRetryAfter(v) } +// GetAdvancedSenderMultiplier safely fetches the Configuration value for state's 'AdvancedSenderMultiplier' field +func (st *ConfigState) GetAdvancedSenderMultiplier() (v int) { + st.mutex.Lock() + v = st.config.AdvancedSenderMultiplier + st.mutex.Unlock() + return +} + +// SetAdvancedSenderMultiplier safely sets the Configuration value for state's 'AdvancedSenderMultiplier' field +func (st *ConfigState) SetAdvancedSenderMultiplier(v int) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.AdvancedSenderMultiplier = v + st.reloadToViper() +} + +// AdvancedSenderMultiplierFlag returns the flag name for the 'AdvancedSenderMultiplier' field +func AdvancedSenderMultiplierFlag() string { return "advanced-sender-multiplier" } + +// GetAdvancedSenderMultiplier safely fetches the value for global configuration 'AdvancedSenderMultiplier' field +func GetAdvancedSenderMultiplier() int { return global.GetAdvancedSenderMultiplier() } + +// SetAdvancedSenderMultiplier safely sets the value for global configuration 'AdvancedSenderMultiplier' field +func SetAdvancedSenderMultiplier(v int) { global.SetAdvancedSenderMultiplier(v) } + // GetCacheGTSAccountMaxSize safely fetches the Configuration value for state's 'Cache.GTS.AccountMaxSize' field func (st *ConfigState) GetCacheGTSAccountMaxSize() (v int) { st.mutex.Lock() -- cgit v1.2.3