summaryrefslogtreecommitdiff
path: root/internal/config/helpers.gen.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-03-06 11:18:57 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-06 11:18:57 +0100
commitb22e213e15a7bc64773e626d76305bd860e6301c (patch)
treebdc0f14481b144f8e4e45a380ea3b7cf78490041 /internal/config/helpers.gen.go
parent[feature] Filters v1 (#2594) (diff)
downloadgotosocial-b22e213e15a7bc64773e626d76305bd860e6301c.tar.xz
[feature/chore] Add Move database functions + cache (#2647)
* [feature/chore] Add Move database functions + cache * add move mem ratio to envparsing.sh * update comment
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r--internal/config/helpers.gen.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go
index c5d4c992b..5f65a6e28 100644
--- a/internal/config/helpers.gen.go
+++ b/internal/config/helpers.gen.go
@@ -3325,6 +3325,31 @@ func GetCacheMentionMemRatio() float64 { return global.GetCacheMentionMemRatio()
// SetCacheMentionMemRatio safely sets the value for global configuration 'Cache.MentionMemRatio' field
func SetCacheMentionMemRatio(v float64) { global.SetCacheMentionMemRatio(v) }
+// GetCacheMoveMemRatio safely fetches the Configuration value for state's 'Cache.MoveMemRatio' field
+func (st *ConfigState) GetCacheMoveMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.MoveMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCacheMoveMemRatio safely sets the Configuration value for state's 'Cache.MoveMemRatio' field
+func (st *ConfigState) SetCacheMoveMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.MoveMemRatio = v
+ st.reloadToViper()
+}
+
+// CacheMoveMemRatioFlag returns the flag name for the 'Cache.MoveMemRatio' field
+func CacheMoveMemRatioFlag() string { return "cache-move-mem-ratio" }
+
+// GetCacheMoveMemRatio safely fetches the value for global configuration 'Cache.MoveMemRatio' field
+func GetCacheMoveMemRatio() float64 { return global.GetCacheMoveMemRatio() }
+
+// SetCacheMoveMemRatio safely sets the value for global configuration 'Cache.MoveMemRatio' field
+func SetCacheMoveMemRatio(v float64) { global.SetCacheMoveMemRatio(v) }
+
// GetCacheNotificationMemRatio safely fetches the Configuration value for state's 'Cache.NotificationMemRatio' field
func (st *ConfigState) GetCacheNotificationMemRatio() (v float64) {
st.mutex.RLock()