Documentation
¶
Overview ¶
Package appstate owns the process-wide mutable runtime state. Configuration is published as immutable snapshots so request and queue goroutines never race with an administrator-triggered reinitialization.
Index ¶
- type State
- func (s *State) Config() config.Config
- func (s *State) NodeMultiplierManager() *nodeMultiplier.Manager
- func (s *State) Reinitialize(subsystem string)
- func (s *State) Restart() error
- func (s *State) SetNodeMultiplierManager(manager *nodeMultiplier.Manager)
- func (s *State) SetReinitialize(handler func(string))
- func (s *State) SetRestart(handler func() error)
- func (s *State) SetTelegramBot(bot *tgbot.Bot)
- func (s *State) TelegramBot() *tgbot.Bot
- func (s *State) UpdateConfig(update func(*config.Config))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) NodeMultiplierManager ¶
func (s *State) NodeMultiplierManager() *nodeMultiplier.Manager
func (*State) Reinitialize ¶
func (*State) SetNodeMultiplierManager ¶
func (s *State) SetNodeMultiplierManager(manager *nodeMultiplier.Manager)
func (*State) SetReinitialize ¶
func (*State) SetRestart ¶
func (*State) SetTelegramBot ¶
func (*State) TelegramBot ¶
func (*State) UpdateConfig ¶
UpdateConfig serializes partial updates and atomically publishes the result. Callers must replace nested slices/maps instead of mutating values retained from an older snapshot.
Click to show internal directories.
Click to hide internal directories.