Skip to main content

Module host

Module host 

Source
Expand description

Core’s side of the protocol: spawn a plugin, negotiate a version, send requests.

Frames are read on a background thread so core can time out a silent plugin during the handshake and never blocks forever on a plugin that has died. stderr is drained on another thread, forwarded to a log sink and kept (last lines) for error messages.

Structs§

PluginInfo
PluginProcess

Enums§

Execution
The outcome of a source execute.
HostError
Incoming
A message from the plugin.

Constants§

DEFAULT_HANDSHAKE_TIMEOUT
INTERACTIVE_ENV
Set to 1 in a plugin’s environment when a person is at core’s terminal, else 0.

Functions§

set_core_version
Set the DRE version sent to plugins in the handshake (core_version). This crate is versioned on its own, so the host names the version of DRE it’s part of; unset, it’s “unreleased”.
stderr_log
A log sink that prefixes each plugin line with the plugin’s file name, on core’s stderr.

Type Aliases§

LogSink
Receives each stderr line a plugin writes.
Result