outputs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutputTypes = []string{
	"file",
	"influxdb",
	"kafka",
	"nats",
	"prometheus",
	"stan",
	"tcp",
	"udp",
}
View Source
var Outputs = map[string]Initializer{}

Functions

func DecodeConfig added in v0.4.0

func DecodeConfig(src, dst interface{}) error

func Register

func Register(name string, initFn Initializer)

Types

type Initializer

type Initializer func() Output

type Meta

type Meta map[string]string

type Option added in v0.5.2

type Option func(Output)

func WithEventProcessors added in v0.6.0

func WithEventProcessors(eps map[string]map[string]interface{}, log *log.Logger) Option

func WithLogger added in v0.5.2

func WithLogger(logger *log.Logger) Option

func WithName added in v0.7.0

func WithName(name string) Option

func WithRegister added in v0.7.0

func WithRegister(reg *prometheus.Registry) Option

type Output

type Output interface {
	Init(context.Context, string, map[string]interface{}, ...Option) error
	Write(context.Context, proto.Message, Meta)
	WriteEvent(context.Context, *formatters.EventMsg)
	Close() error
	RegisterMetrics(*prometheus.Registry)
	String() string
	SetLogger(*log.Logger)
	SetEventProcessors(map[string]map[string]interface{}, *log.Logger)
	SetName(string)
}

Jump to

Keyboard shortcuts

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