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

inputs

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 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",
	"jetstream",
}
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]any, ...Option) error
	Close() error
}

type InputOptions added in v0.42.1

type InputOptions struct {
	Logger          *log.Logger
	Outputs         map[string]outputs.Output
	Name            string
	EventProcessors map[string]map[string]any
	Targets         map[string]*types.TargetConfig
	Actions         map[string]map[string]any
}

type Option

type Option func(*InputOptions) error

func WithEventProcessors

func WithEventProcessors(eps map[string]map[string]any, acts map[string]map[string]any) 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

func WithTargets added in v0.42.1

func WithTargets(tcs map[string]*types.TargetConfig) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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