Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Exporters = make(map[string]ExporterConstructor)
Exporters are the constructors to build exporter plugins.
Functions ¶
func Register ¶
func Register(name string, constructor ExporterConstructor)
Register is used to register ExporterConstructor implementations. This mechanism allows for loose coupling between the configuration and the implementation. It is extremely similar to the way sql.DB drivers are configured and used.
Types ¶
type Exporter ¶
type Exporter interface { // Plugin - implement this interface. plugins.Plugin // Receive is called for each block to be processed by the exporter. // Should return an error on failure--retries are configurable. Receive(exportData data.BlockData) error }
Exporter defines the interface for plugins
type ExporterConstructor ¶
type ExporterConstructor interface { // New should return an instantiation of an Exporter. // Configuration values should be passed and can be processed during `Init()`. New() Exporter }
ExporterConstructor must be implemented by each Exporter. It provides a basic no-arg constructor for instances of an ExporterImpl.
func ExporterConstructorByName ¶ added in v1.3.0
func ExporterConstructorByName(name string) (ExporterConstructor, error)
ExporterConstructorByName returns a Processor constructor for the name provided
type ExporterConstructorFunc ¶
type ExporterConstructorFunc func() Exporter
ExporterConstructorFunc is Constructor implementation for exporters
func (ExporterConstructorFunc) New ¶
func (f ExporterConstructorFunc) New() Exporter
New initializes an exporter constructor
Click to show internal directories.
Click to hide internal directories.