Compare commits
1
Commits
222aee8889
...
dede07748a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dede07748a |
@@ -93,9 +93,6 @@ namespace Echoion::Api
|
||||
updateConfigJson(const std::string& configJson) = 0;
|
||||
[[nodiscard]] virtual Result<std::string> getConfigJson() const = 0;
|
||||
|
||||
// Reload configuration from the config file on disk.
|
||||
virtual Result<void> reloadConfig() = 0;
|
||||
|
||||
// Hot reload - using serialization instead of HotReloadState
|
||||
// Returns opaque handle that Plugin just passes back
|
||||
[[nodiscard]] virtual Result<std::string> prepareForHotReload() = 0;
|
||||
@@ -152,6 +149,15 @@ namespace Echoion::Api
|
||||
getConfigHandle() const = 0;
|
||||
virtual Result<void>
|
||||
updateConfigFromHandle(AppConfigHandle config) = 0;
|
||||
|
||||
// Reload configuration from the config file on disk.
|
||||
// NOTE: append-only. ICoreInterface is the hot-reload ABI contract
|
||||
// between the (already-loaded) Plugin and a freshly reloaded Core.
|
||||
// Inserting/removing a virtual method anywhere above shifts every
|
||||
// later vtable slot, so the old Plugin would call the wrong methods
|
||||
// on the new Core (state-transfer corruption on hot reload). Only
|
||||
// ever add new virtuals at the very end.
|
||||
virtual Result<void> reloadConfig() = 0;
|
||||
};
|
||||
|
||||
} // namespace Echoion::Api
|
||||
Reference in new issue
Block a user