Documentation ¶
Overview ¶
Package processor provides builtin processors and processor plugin loader
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputLabel ¶
func OutputLabel ¶
Types ¶
type Processor ¶
type Processor interface { // Report human-readable label for each input and output Label() (inputlabel []string, outputlabel []string) // Given a fixed number of input files, generate output to corresponding files // with execution result. It's ok if result == nil, which means success. Run(input []string, output []string) (result *Result) }
Processor takes a series of input (files) and generates a series of outputs.
func LoadPlugin ¶
Plugin describes how to build a custom processor by creating a shared library with specific symbol exposed.
Conventionally, plugin is written in go which is compiled to a shared library (plugin) and is loaded in runtime. However we also plan to support C/C++ plugin due to its popularity.
Load a go plugin as processor. The plugin requires two exported functions:
func Label() (input []string, output []string) func Main(inputs []string, outputs []string) int
Click to show internal directories.
Click to hide internal directories.