This commit is contained in:
Gilles Soulier
2025-12-24 14:47:39 +01:00
parent 4590c120fb
commit 383ad292d3
52 changed files with 4694 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
package settings
import "sync"
type Runtime struct {
mu sync.RWMutex
current Settings
}
func NewRuntime(initial Settings) *Runtime {
return &Runtime{current: initial}
}
func (r *Runtime) Get() Settings {
r.mu.RLock()
defer r.mu.RUnlock()
return r.current
}
func (r *Runtime) Update(next Settings) {
r.mu.Lock()
r.current = next
r.mu.Unlock()
}