From 5bc567196bf2204272950c525e8592e56057c3bd Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:44:29 +0200 Subject: [chore] Add interaction policy gtsmodels (#3075) * [chore] introduce interaction policy gts models * update migration a smidge * fix copy paste typo * update migration * use int for InteractionType --- internal/config/helpers.gen.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'internal/config/helpers.gen.go') diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index 71a77e753..8dab7ac6a 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -3250,6 +3250,33 @@ func GetCacheInstanceMemRatio() float64 { return global.GetCacheInstanceMemRatio // SetCacheInstanceMemRatio safely sets the value for global configuration 'Cache.InstanceMemRatio' field func SetCacheInstanceMemRatio(v float64) { global.SetCacheInstanceMemRatio(v) } +// GetCacheInteractionApprovalMemRatio safely fetches the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field +func (st *ConfigState) GetCacheInteractionApprovalMemRatio() (v float64) { + st.mutex.RLock() + v = st.config.Cache.InteractionApprovalMemRatio + st.mutex.RUnlock() + return +} + +// SetCacheInteractionApprovalMemRatio safely sets the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field +func (st *ConfigState) SetCacheInteractionApprovalMemRatio(v float64) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.InteractionApprovalMemRatio = v + st.reloadToViper() +} + +// CacheInteractionApprovalMemRatioFlag returns the flag name for the 'Cache.InteractionApprovalMemRatio' field +func CacheInteractionApprovalMemRatioFlag() string { return "cache-interaction-approval-mem-ratio" } + +// GetCacheInteractionApprovalMemRatio safely fetches the value for global configuration 'Cache.InteractionApprovalMemRatio' field +func GetCacheInteractionApprovalMemRatio() float64 { + return global.GetCacheInteractionApprovalMemRatio() +} + +// SetCacheInteractionApprovalMemRatio safely sets the value for global configuration 'Cache.InteractionApprovalMemRatio' field +func SetCacheInteractionApprovalMemRatio(v float64) { global.SetCacheInteractionApprovalMemRatio(v) } + // GetCacheListMemRatio safely fetches the Configuration value for state's 'Cache.ListMemRatio' field func (st *ConfigState) GetCacheListMemRatio() (v float64) { st.mutex.RLock() -- cgit v1.2.3