Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Config *models.ServerConfig ConfigPath = "config.json" )
var ClaudeManager *claudeauth.Manager
ClaudeManager is the singleton credential pool manager for claude-code providers. Set once at server startup by main.go before any requests are served.
var CodexManager *codexauth.Manager
CodexManager is the singleton credential pool manager for openai-codex providers. Set once at server startup by main.go before any requests are served.
var Mu sync.RWMutex
Mu protects Config and config.json from concurrent reads/writes. Readers take RLock; the save path takes Lock.
Functions ¶
func LoadConfigFromFile ¶
func LoadConfigFromFile(path string) (*models.ServerConfig, error)
LoadConfigFromFile loads configuration from a JSON file.
func ReloadConfig ¶
func ReloadConfig() error
ReloadConfig reloads the configuration from file. On failure the existing Config is preserved so callers always have a valid pointer.
func SaveConfig ¶
func SaveConfig(cfg *models.ServerConfig) error
SaveConfig serialises the provider/analysis/notifications fields of cfg to ConfigPath atomically (write to tmp, then rename) and replaces the in-memory Config pointer. Feeds are excluded (they live in feeds.yml). The file is written with mode 0600 because it may contain OAuth tokens.
Types ¶
This section is empty.