processors

package
v0.0.0-...-89257ae Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry = make(map[string]Processor)

Functions

func Register

func Register(procName string, proc Processor)

Register is called by the `init` function of every `Component` to add the caller to the global `Registry` map. If the caller attempts to add a `Component` to the registry using the same name as a prior `Component` the call will log an error and exit.

Types

type Config

type Config struct {
	RawConfig map[string]string
}

func (Config) GetString

func (conf Config) GetString(key string) (string, bool)

type Default

type Default struct{}

func (Default) Configure

func (Default) Configure() error

type PError

type PError struct {
	Errors []error
}

func (*PError) Add

func (e *PError) Add(err error)

func (*PError) AsStrings

func (e *PError) AsStrings() []string

func (*PError) Empty

func (e *PError) Empty() bool

func (*PError) Len

func (e *PError) Len() int

type Processor

type Processor interface {
	Configure() error
	Run(string, *Config, writer.IManager) PError
}

func Get

func Get(procName string) (Processor, error)

GetProcessor returns the Component specified by name from `Registry`.

Jump to

Keyboard shortcuts

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