Own ConfigManager in Core; resolve config via DI instead of the singleton

Core holds a ConfigManager member, keeps it synced (updateConfig(config_)),
and provides it as a service. ConfigManager.cpp drops the instance()
definition. MusicManager gets the manager via setConfigManager() and reads
sections through it (former ECHOION_BOT/YOUTUBE/NETWORK sites); RpcInfoCommand
resolves it from the registry via ctx.service<Api::ConfigManager>(). Build
green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 4.8 committed 2026-06-23 14:01:31 +03:00
1 parent f7553d10d3
commit 0e08ccaefa
6 files changed
+29 -14

No files matched your search

-6
View File
@@ -6,12 +6,6 @@
namespace Echoion::Api
{
ConfigManager& ConfigManager::instance()
{
static ConfigManager instance;
return instance;
}
bool ConfigManager::initialize(const std::filesystem::path& configPath)
{
std::unique_lock lock(mutex_);