plugins

package
v0.0.0-...-8101777 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: AGPL-3.0-or-later Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func StartPlugins

func StartPlugins(
	logger *zap.Logger,
	db *gorm.DB,
	redis *redis.Client,
	tokens map[string]string,
	state *state.State,
	featureFlagger *featureflag.FeatureFlagger,
	publisher *events.Publisher,
	httpMux *chi.Mux,
)

func StopPlugins

func StopPlugins(
	logger *zap.Logger,
	db *gorm.DB,
	redis *redis.Client,
	tokens map[string]string,
	state *state.State,
	featureFlagger *featureflag.FeatureFlagger,
	publisher *events.Publisher,
)

Types

type ByPriority

type ByPriority []Plugin

func (ByPriority) Len

func (p ByPriority) Len() int

func (ByPriority) Less

func (p ByPriority) Less(i, j int) bool

func (ByPriority) Swap

func (p ByPriority) Swap(i, j int)

type Plugin

type Plugin interface {
	Names() []string

	// TODO: add context for deadline
	Start(common.StartParameters) error

	// TODO: add context for deadline
	Stop(common.StopParameters) error
	Priority() int
	Passthrough() bool
	Action(event *events.Event) bool
	Help() *common.PluginHelp
}

Jump to

Keyboard shortcuts

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