plugin

package
v0.1.2-beta Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

func GlobalPluginFactory

func GlobalPluginFactory() *Factory

func (*Factory) Create

func (f *Factory) Create(name string) (Plugin, error)

func (*Factory) Exists

func (f *Factory) Exists(name string) bool

func (*Factory) Register

func (f *Factory) Register(name string, creator func() Plugin)

type Manger

type Manger interface {
	LoadPlugins()
	UnloadPlugins()
	LoadSpecificPlugins(plugins []string)
	UnloadSpecificPlugins(plugins []string)
}

type Plugin

type Plugin interface {
	Weight() int
	Name() string
	Load(config.Value) (Plugin, error)
	Unload() error
}

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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