exporters

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

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

New initializes an exporter constructor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL