plugin

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterStatus added in v0.2.1

type FilterStatus struct {
	Name           string
	Plugin         string
	Config         interface{}
	ReferenceCount int
}

type Manager

type Manager interface {
	Receiverers() map[string]pkgreceiver.NewReceiverer
	RegisterReceiver(
		ctx context.Context, plugin string,
		name string, config interface{},
		tid tenant.Id,
	) (pkgreceiver.Receiver, error)
	Receivers() map[string]pkgreceiver.Receiver
	ReceiversStatus() map[string]ReceiverStatus
	UnregisterReceiver(ctx context.Context, r pkgreceiver.Receiver) error

	Filterers() map[string]pkgfilter.NewFilterer
	RegisterFilter(
		ctx context.Context, plugin string,
		name string, config interface{},
		tid tenant.Id,
	) (pkgfilter.Filterer, error)
	Filters() map[string]pkgfilter.Filterer
	FiltersStatus() map[string]FilterStatus
	UnregisterFilter(ctx context.Context, f pkgfilter.Filterer) error

	Senderers() map[string]pkgsender.NewSenderer
	RegisterSender(
		ctx context.Context, plugin string,
		name string, config interface{},
		tid tenant.Id,
	) (pkgsender.Sender, error)
	Senders() map[string]pkgsender.Sender
	SendersStatus() map[string]SenderStatus
	UnregisterSender(ctx context.Context, s pkgsender.Sender) error
}

func NewManager

func NewManager(options ...ManagerOption) (Manager, error)

type ManagerOption

type ManagerOption func(*manager) error

func WithLogger

func WithLogger(l *zerolog.Logger) ManagerOption

func WithNextFnDeadline

func WithNextFnDeadline(d time.Duration) ManagerOption

func WithPluginManager

func WithPluginManager(p pkgmanager.Manager) ManagerOption

func WithQuotaManager

func WithQuotaManager(q *quota.QuotaManager) ManagerOption

func WithSecretVaults added in v0.4.0

func WithSecretVaults(s secret.Vault) ManagerOption

type NotRegisteredError

type NotRegisteredError struct{}

func (*NotRegisteredError) Error

func (e *NotRegisteredError) Error() string

func (*NotRegisteredError) Unwrap

func (e *NotRegisteredError) Unwrap() error

type OptionError

type OptionError struct {
	Message string
	Err     error
}

func (*OptionError) Error

func (e *OptionError) Error() string

func (*OptionError) Unwrap

func (e *OptionError) Unwrap() error

type ReceiverStatus added in v0.2.1

type ReceiverStatus struct {
	Name           string
	Plugin         string
	Config         interface{}
	ReferenceCount int
}

type RegistrationError

type RegistrationError struct {
	Message string
	Plugin  string
	Name    string
	Err     error
}

func (*RegistrationError) Error

func (e *RegistrationError) Error() string

func (*RegistrationError) Unwrap

func (e *RegistrationError) Unwrap() error

type SenderStatus added in v0.2.1

type SenderStatus struct {
	Name           string
	Plugin         string
	Config         interface{}
	ReferenceCount int
}

type UnregistrationError

type UnregistrationError struct {
	Message string
	Err     error
}

func (*UnregistrationError) Error

func (e *UnregistrationError) Error() string

func (*UnregistrationError) Unwrap

func (e *UnregistrationError) Unwrap() error

Jump to

Keyboard shortcuts

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