Class PluginLoader
Defined in File plugin_loader.hpp
Class Documentation
-
class PluginLoader
Loads a GatewayPlugin from a shared library (.so).
The .so must export (with GATEWAY_PLUGIN_EXPORT visibility): extern “C” int plugin_api_version(); // must return PLUGIN_API_VERSION extern “C” GatewayPlugin* create_plugin(); // factory
Optionally, for provider interface discovery (avoids RTTI across dlopen boundary): extern “C” UpdateProvider* get_update_provider(GatewayPlugin* plugin); extern “C” IntrospectionProvider* get_introspection_provider(GatewayPlugin* plugin); extern “C” LogProvider* get_log_provider(GatewayPlugin* plugin); extern “C” ScriptProvider* get_script_provider(GatewayPlugin* plugin);
Path requirements: must be absolute, have .so extension, and resolve to a real file.
Public Static Functions
-
static tl::expected<GatewayPluginLoadResult, std::string> load(const std::string &plugin_path)
Load plugin from .so path. Returns plugin + handle, or error string.
-
static tl::expected<GatewayPluginLoadResult, std::string> load(const std::string &plugin_path)