plugins

package
v0.0.0-...-dade96f 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: 25 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,
)

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 Plugin

type Plugin interface {
	Name() string
	Interval() time.Duration

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

	// TODO: add context for deadline
	Stop(common.StopParameters) error
	Localizations() []interfaces.Localization
	Run(run *common.Run) error
}

Jump to

Keyboard shortcuts

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