actions

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Actions = map[string]Initializer{}

Functions

func DecodeConfig

func DecodeConfig(src, dst interface{}) error

func Register

func Register(name string, initFn Initializer)

Types

type Action

type Action interface {
	Init(map[string]interface{}, ...Option) error
	Run(*formatters.EventMsg) (interface{}, error)

	WithTargets(map[string]interface{})
	WithLogger(*log.Logger)
}

type Initializer

type Initializer func() Action

type Option

type Option func(Action)

func WithLogger

func WithLogger(l *log.Logger) Option

func WithTargets

func WithTargets(tcs map[string]interface{}) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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