factory

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAction

func NewAction(logger log.Logger, cfg config.Action) (types.Action, error)

func NewActionLog

func NewActionLog(cfg config.ActionLog) (*action.Log, error)

func NewActionNotify

func NewActionNotify(logger log.Logger, cfg config.ActionNotify) (*action.Notify, error)

func NewActionsMap

func NewActionsMap(logger log.Logger, cfgs map[string]config.Action) (map[string]types.Action, error)

func NewFormatter

func NewFormatter(cfg config.Format) (types.Formatter, error)

func NewMatcher

func NewMatcher(cfg *config.Matcher) (types.Matcher, error)

NewMatcher creates a new Mather from config. The field is just used for debugging.

func NewMatchers

func NewMatchers(cfgs []*config.Matcher) ([]types.Matcher, error)

func NewNotifier

func NewNotifier(cfgs []config.NotifyService) (notify.Notifier, error)

func NewNotifierService

func NewNotifierService(cfg config.NotifyService) (notify.Notifier, error)

func NewNotifierServices

func NewNotifierServices(cfgs []config.NotifyService) ([]notify.Notifier, error)

func NewPersister

func NewPersister(cfg config.Persister) (types.Persister, error)

NewPersister cretaes a new Persister from config.

func NewPipelines

func NewPipelines(logger log.Logger, cfg *config.Config) ([]*pipeline.Pipeline, error)

func NewProcessor

func NewProcessor(cfg config.Processor, actionsMap map[string]types.Action) (types.Processor, error)

NewProcessor reads config and creates a Processor.

func NewProcessorsFromMap

func NewProcessorsFromMap(processorsMap map[string]processor.Factory, names []string) (processor.Factory, error)

NewProcessorsFromMap reads configs and creates Processors.

func NewProcessorsMap

func NewProcessorsMap(
	cfgs map[string]config.Processor,
	actionsMap map[string]types.Action,
) (map[string]processor.Factory, error)

func NewReader

func NewReader(
	logger log.Logger,
	persister types.Persister,
	newProcessor processor.Factory,
	cfg config.Reader,
) (types.Reader, error)

NewReader creates a new Reader from config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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