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

inputs

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 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, map[string]map[string]interface{}) error
	SetName(string)
}

type Option

type Option func(Input) error

func WithEventProcessors

func WithEventProcessors(eps map[string]map[string]interface{}, log *log.Logger, tcs map[string]*types.TargetConfig, acts map[string]map[string]interface{}) 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