Help us shape the future of Go! Take the 2026 Go Developer Survey

inputs

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InputTypes = []string{
	"nats",
	"stan",
	"kafka",
}
View Source
var Inputs = map[string]Initializer{}

Functions

func Register

func Register(name string, initFn Initializer)

Types

type Initializer

type Initializer func() Input

type Input

type Input interface {
	Start(context.Context, string, map[string]interface{}, ...Option) error
	Close() error
	SetLogger(*log.Logger)
	SetOutputs(map[string]outputs.Output)
	SetEventProcessors(map[string]map[string]interface{}, *log.Logger, map[string]*types.TargetConfig)
	SetName(string)
}

type Option

type Option func(Input)

func WithEventProcessors added in v0.8.0

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

func WithLogger

func WithLogger(logger *log.Logger) Option

func WithName

func WithName(name string) Option

func WithOutputs

func WithOutputs(outs map[string]outputs.Output) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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