plugin

package
v5.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core added in v5.3.5

type Core struct {
	Plugins []Plugin
}

func (*Core) GetPlugin added in v5.4.0

func (c *Core) GetPlugin(name string) (MyrteaPlugin, bool)

GetPlugin returns a plugin by its name

func (*Core) PluginExists added in v5.3.5

func (c *Core) PluginExists(name string) (exists bool)

PluginExists checks if a plugin with the given name exists

func (*Core) RegisterPlugins added in v5.3.5

func (c *Core) RegisterPlugins()

RegisterPlugins Registers all plugins that were added into the TOML config file

func (*Core) Start added in v5.3.5

func (c *Core) Start()

Start starts all plugins

func (*Core) Stop added in v5.3.5

func (c *Core) Stop()

Stop stops all plugins registered in core

type MyrteaPlugin

type MyrteaPlugin interface {
	ServicePort() int
	HandlerPrefix() string
	Handler() http.Handler
	Start() error
	Stop() error
	Running() bool
}

MyrteaPlugin is a standard interface for any myrtea plugins

type Plugin added in v5.3.5

type Plugin struct {
	Config pluginutils.PluginConfig
	Plugin MyrteaPlugin
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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