plugin

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: 23 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
	SuccessCount    int
	ErrorCount      int
	FilterCount     int
	SuccessVelocity int
	ErrorVelocity   int
	FilterVelocity  int
	LastEventTs     int64
	Tid             tenant.Id
}

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

func WithSyncer added in v1.1.2

func WithSyncer(tableSyncer syncer.DeltaSyncer) ManagerOption

func WithTenantStorer added in v1.1.2

func WithTenantStorer(t tenant.TenantStorer) 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
	SuccessCount    int
	ErrorCount      int
	SuccessVelocity int
	ErrorVelocity   int
	LastEventTs     int64
	Tid             tenant.Id
}

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
	SuccessCount    int
	ErrorCount      int
	SuccessVelocity int
	ErrorVelocity   int
	LastEventTs     int64
	Tid             tenant.Id
}

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