diff options
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/config.go | 2 | ||||
-rw-r--r-- | internal/config/defaults.go | 2 | ||||
-rw-r--r-- | internal/config/helpers.gen.go | 26 |
3 files changed, 14 insertions, 16 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 4bb9be0c4..d6b8f0a54 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -218,7 +218,7 @@ type CacheConfiguration struct { FollowRequestIDsMemRatio float64 `name:"follow-request-ids-mem-ratio"` InReplyToIDsMemRatio float64 `name:"in-reply-to-ids-mem-ratio"` InstanceMemRatio float64 `name:"instance-mem-ratio"` - InteractionApprovalMemRatio float64 `name:"interaction-approval-mem-ratio"` + InteractionRequestMemRatio float64 `name:"interaction-request-mem-ratio"` ListMemRatio float64 `name:"list-mem-ratio"` ListEntryMemRatio float64 `name:"list-entry-mem-ratio"` MarkerMemRatio float64 `name:"marker-mem-ratio"` diff --git a/internal/config/defaults.go b/internal/config/defaults.go index 3ef988f06..e71711cb3 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -181,7 +181,7 @@ var Defaults = Configuration{ FollowRequestIDsMemRatio: 2, InReplyToIDsMemRatio: 3, InstanceMemRatio: 1, - InteractionApprovalMemRatio: 1, + InteractionRequestMemRatio: 1, ListMemRatio: 1, ListEntryMemRatio: 2, MarkerMemRatio: 0.5, diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index f176676e5..d19e4e241 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -3412,32 +3412,30 @@ 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) { +// GetCacheInteractionRequestMemRatio safely fetches the Configuration value for state's 'Cache.InteractionRequestMemRatio' field +func (st *ConfigState) GetCacheInteractionRequestMemRatio() (v float64) { st.mutex.RLock() - v = st.config.Cache.InteractionApprovalMemRatio + v = st.config.Cache.InteractionRequestMemRatio st.mutex.RUnlock() return } -// SetCacheInteractionApprovalMemRatio safely sets the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field -func (st *ConfigState) SetCacheInteractionApprovalMemRatio(v float64) { +// SetCacheInteractionRequestMemRatio safely sets the Configuration value for state's 'Cache.InteractionRequestMemRatio' field +func (st *ConfigState) SetCacheInteractionRequestMemRatio(v float64) { st.mutex.Lock() defer st.mutex.Unlock() - st.config.Cache.InteractionApprovalMemRatio = v + st.config.Cache.InteractionRequestMemRatio = v st.reloadToViper() } -// CacheInteractionApprovalMemRatioFlag returns the flag name for the 'Cache.InteractionApprovalMemRatio' field -func CacheInteractionApprovalMemRatioFlag() string { return "cache-interaction-approval-mem-ratio" } +// CacheInteractionRequestMemRatioFlag returns the flag name for the 'Cache.InteractionRequestMemRatio' field +func CacheInteractionRequestMemRatioFlag() string { return "cache-interaction-request-mem-ratio" } -// GetCacheInteractionApprovalMemRatio safely fetches the value for global configuration 'Cache.InteractionApprovalMemRatio' field -func GetCacheInteractionApprovalMemRatio() float64 { - return global.GetCacheInteractionApprovalMemRatio() -} +// GetCacheInteractionRequestMemRatio safely fetches the value for global configuration 'Cache.InteractionRequestMemRatio' field +func GetCacheInteractionRequestMemRatio() float64 { return global.GetCacheInteractionRequestMemRatio() } -// SetCacheInteractionApprovalMemRatio safely sets the value for global configuration 'Cache.InteractionApprovalMemRatio' field -func SetCacheInteractionApprovalMemRatio(v float64) { global.SetCacheInteractionApprovalMemRatio(v) } +// SetCacheInteractionRequestMemRatio safely sets the value for global configuration 'Cache.InteractionRequestMemRatio' field +func SetCacheInteractionRequestMemRatio(v float64) { global.SetCacheInteractionRequestMemRatio(v) } // GetCacheListMemRatio safely fetches the Configuration value for state's 'Cache.ListMemRatio' field func (st *ConfigState) GetCacheListMemRatio() (v float64) { |