plugins

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host interface {
	GetLogger() *logging.Logger
	GetRouter() *heligo.Router
	GetDBE() *database.DbEngine
}

Host interface is the gateway for plugins to smoothdb basic subsystems

type Plugin

type Plugin interface {
	// Prepare is called during smoothdb initialization, when
	// the accessible subsystems are ready
	Prepare(Host) error
	// Run is called right after Prepare to run the plugin.
	// It can just return or spawn goroutines if necessary.
	Run() error
}

Plugin is the interface that plugins must implement

type PluginManager

type PluginManager struct {
	// contains filtered or unexported fields
}

PluginManager

func InitPluginManager

func InitPluginManager(host Host, dir string, plugins []string) *PluginManager

InitPluginManager initializes the Plugin Manager

func (PluginManager) Load

func (pm PluginManager) Load() error

Load prepares and runs plugins

Jump to

Keyboard shortcuts

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