manager

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) (*manager, error)

Types

type AlreadyRegisteredError

type AlreadyRegisteredError struct{}

func (*AlreadyRegisteredError) Error

func (e *AlreadyRegisteredError) Error() string

func (*AlreadyRegisteredError) Unwrap

func (e *AlreadyRegisteredError) Unwrap() error

type Capabilities

type Capabilities struct {
	Receiver bool
	Filterer bool
	Sender   bool
}

type Config

type Config struct {
	Name   string `yaml:"name"`
	Path   string `yaml:"path"`
	Config string `yaml:"config"`
}

type InvalidConfigError

type InvalidConfigError struct {
	Err error
}

func (*InvalidConfigError) Error

func (e *InvalidConfigError) Error() string

func (*InvalidConfigError) Unwrap

func (e *InvalidConfigError) Unwrap() error

type Manager

type Manager interface {
	// Probably needs some sort of asset interface to
	// be able to load from file system, s3, and other places [Future]
	LoadPlugin(config Config) (plugin.Pluginer, error)

	RegisterPlugin(name string, p plugin.Pluginer) error
	UnregisterPlugin(name string) error

	Plugins() map[string]Registration
	Plugin(name string) Registration

	Receiverers() map[string]receiver.NewReceiverer
	Receiverer(pluginName string) (receiver.NewReceiverer, error)

	Filterers() map[string]filter.NewFilterer
	Filterer(pluginName string) (filter.NewFilterer, error)

	Senderers() map[string]sender.NewSenderer
	Senderer(pluginName string) (sender.NewSenderer, error)
}

type NewFiltererNotImplementedError

type NewFiltererNotImplementedError struct{}

func (*NewFiltererNotImplementedError) Error

func (*NewFiltererNotImplementedError) Unwrap

type NewPluginerError

type NewPluginerError struct {
	Err error
}

NewPluginerError is returned when the call to NewPluginer on a loaded plugin results in an error.

func (*NewPluginerError) Error

func (e *NewPluginerError) Error() string

func (*NewPluginerError) Unwrap

func (e *NewPluginerError) Unwrap() error

type NewPluginerNotImplementedError

type NewPluginerNotImplementedError struct{}

NewPluginerNotImplementedError is returned when the Plugin interface is not properly implemented

func (*NewPluginerNotImplementedError) Error

func (*NewPluginerNotImplementedError) Unwrap

type NewReceivererNotImplementedError

type NewReceivererNotImplementedError struct{}

func (*NewReceivererNotImplementedError) Error

func (*NewReceivererNotImplementedError) Unwrap

type NewSendererNotImplementedError

type NewSendererNotImplementedError struct{}

func (*NewSendererNotImplementedError) Error

func (*NewSendererNotImplementedError) Unwrap

type NilPluginError

type NilPluginError struct{}

func (*NilPluginError) Error

func (e *NilPluginError) Error() string

func (*NilPluginError) Unwrap

func (e *NilPluginError) Unwrap() error

type NotFoundError

type NotFoundError struct{}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type NotRegisteredError

type NotRegisteredError struct{}

func (*NotRegisteredError) Error

func (e *NotRegisteredError) Error() string

func (*NotRegisteredError) Unwrap

func (e *NotRegisteredError) Unwrap() error

type OpenPluginError

type OpenPluginError struct {
	Err error
}

OpenPluginError is returned when the Go plugin framework is unable to load the plugin.

func (*OpenPluginError) Error

func (e *OpenPluginError) Error() string

func (*OpenPluginError) Unwrap

func (e *OpenPluginError) Unwrap() error

type Option

type Option func(OptionProcessor) error

type OptionProcessor

type OptionProcessor interface{}

type Registration

type Registration struct {
	Config Config
	Plugin plugin.Pluginer

	Capabilities Capabilities
}

type VariableLookupError

type VariableLookupError struct {
	Err error
}

VariableLookupError is returned when no variable `Plugin` can be found in the compiled plugin

func (*VariableLookupError) Error

func (e *VariableLookupError) Error() string

func (*VariableLookupError) Unwrap

func (e *VariableLookupError) Unwrap() error

Jump to

Keyboard shortcuts

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