Skip to main content

Module plugin

Module plugin 

Source
Expand description

The plugin SDK: implement one of Source, Format or Destination and call the matching serve_* function from main. The SDK owns stdin/stdout, the handshake, framing, error replies and panics; plugins log with eprintln!.

Formats and destinations declare their options (options()) and add any rule a declaration can’t express (validate()). The SDK checks a config block against both on validate and before every write and deliver, so plugin code only sees options that passed.

Structs§

About
Identity reported in the handshake.
Delivery
A destination deliver request.
DeliveryFile
One file to deliver: the local copy in target/run/ and its rendered remote path, if any.
Input
Loaded
The outcome of Source::load.
ResultSet
One incoming result set, streamed from core.
ResultSets
Hands a format plugin its result sets one at a time, in order.
WriteRequest
A format write request.

Enums§

Plugin
One of the plugins a package’s executable serves (see serve_package).

Traits§

Destination
Format
ResultSink
Where a source pushes the outcome of execute: either no_result, or begin followed by any number of batch calls.
Source

Functions§

conn_bool
Read a flag that may be written as a boolean or a string.
conn_required
Read a required string field from a connection map.
conn_str
Read a string field from a connection map.
serve_destination
serve_format
serve_package
Serve every plugin of a package from one executable. Core’s hello names the plugin it wants; without one, the first is served.
serve_source

Type Aliases§

Error
Result