Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶ added in v1.1.0
Metadata returns fields relevant to identification and description of plugins.
type Plugin ¶ added in v1.2.0
type Plugin interface { // Metadata associated with the plugin. Metadata() Metadata // Init will be called during initialization, before block data starts going through the pipeline. // Typically this is used for things like initializing network connections. // The Context passed to Init() will be used for deadlines, cancelling signals and other early terminations. // The InitProvider passed to Init() will be used to determine the initial next round for consideration. // The Config passed to Init() will contain the unmarshalled config file specific to this plugin. // If any of these fail an error is returned --this will result in the Conduit process terminating. Init(ctx context.Context, initProvider data.InitProvider, cfg PluginConfig, logger *logrus.Logger) error // Close will be called during termination of the Conduit process. // There is no guarantee that plugin lifecycle hooks will be invoked in any specific order in relation to one another. // Returns an error if it fails which will be surfaced in the logs, but the process is already terminating. Close() error }
Plugin is the common interface for all Conduit plugins.
type PluginConfig ¶
type PluginConfig struct { // DataDir available to this plugin. DataDir string // Config specific to this plugin. Config string }
PluginConfig is a generic string which can be deserialized by each individual Plugin
func MakePluginConfig ¶
func MakePluginConfig(config string) PluginConfig
MakePluginConfig is a helper to create the struct.
func (PluginConfig) UnmarshalConfig ¶
func (pc PluginConfig) UnmarshalConfig(config interface{}) error
UnmarshalConfig attempts to Unmarshal the plugin config into an object.
type PluginType ¶
type PluginType string
PluginType is defined for each plugin category
const ( // Exporter PluginType Exporter PluginType = "exporter" // Processor PluginType Processor PluginType = "processor" // Importer PluginType Importer PluginType = "importer" )
Directories ¶
Path | Synopsis |
---|---|
filterprocessor
Package filterprocessor docs
|
Package filterprocessor docs |
Click to show internal directories.
Click to hide internal directories.