This module defines the API that can be used for implementing plugins.
NOTE: this API is NOT FFI-safe and is intended for use in the plugin AFTER the FFI layer.
See plugin_interface::ffi for the FFI-safe types and traits.
A single identity label for a plugin instance. Plugins use this to declare what they
are — typically derived from their options at create time (e.g. a Kafka plugin
declaring its topic, an Ethereum plugin declaring its chain slug). The metrics
subsystem is the first consumer: labels are attached to every metric the plugin’s
source/transform/sink emits. Other subsystems that need plugin identity (future admin
UIs, log-line decoration, tracing) can read the same field without a new FFI surface.
Descriptor for a side output provided by a plugin.
Side outputs use direct FFI invocation (no channels) and are auto-registered on all sources.
One instance is created per source — the macro manages a HashMap<source_name, instance>.
Type for the keys used in the state backend.
For simplicity, it’s assumed that all state backends will use the same key format (strings).
If it were to change, a new generic type could be added, similar to the V type parameter.
Conversion trait that lets register_plugin_sink! accept constructors
returning either Self (infallible) or Result<Self, PluginInitializationError>
(fallible). Existing plugins that return Self continue to work unchanged.
Conversion trait that lets register_plugin_source! accept constructors
returning either Self (infallible) or Result<Self, PluginInitializationError>
(fallible). Existing plugins that return Self continue to work unchanged.
Conversion trait that lets register_plugin_transform! accept constructors
returning either Self (infallible) or Result<Self, PluginInitializationError>
(fallible). Existing plugins that return Self continue to work unchanged.