Skip to main content

Module host

Module host 

Source
Expand description

The plugin host lifecycle (internal/pluginhost/host.go, snapshot.go).

Host::apply_config discovers plugin files, loads new ones (dlopen and plugin.register), reconfigures loaded ones (plugin.reconfigure), hot-reloads a changed file (plugin.quiesce on the old instance, rollback when the new one fails, the old instance retired but still loaded) and publishes an immutable snapshot of active plugins ordered by priority (descending) then ID. Disabling plugins globally empties the snapshot but keeps libraries loaded, as Go does. A plugin whose host-side adapter panicked is fused: skipped until its file changes.

Structs§

Host
The plugin host. Cheap to clone.
NativeLoader
dlopen-based loader (Unix). Other platforms report plugins as unsupported.
Record
One active plugin in a snapshot (Go capabilityRecord).
RegisteredPluginInfo
Go RegisteredPluginInfo.
RegisteredPluginMenu
Go RegisteredPluginMenu.
Snapshot
Active plugins, highest priority first.

Traits§

Loader
Opens plugin libraries. The production loader is NativeLoader.

Functions§

bytes_of
Payload bytes for an RPC field that Go fills with bytes.Clone.
normalize_provider
Go normalizeProviderID.
support_plugin_header_value
Go SupportPluginHeaderValue: 1 when this build can load native plugins.