plugin

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 20 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate added in v0.16.0

func Generate() bool

func Register

func Register(name string, plugin Pluggable) error

Register registers a type of plugin into the choria server

Types

type List

type List struct {
	Plugins []*Plugin
}

List is a list of plugins to load

func Load

func Load(file string) (*List, error)

Load loads a plugin list from file

type Pluggable

type Pluggable interface {
	// PluginInstance is any structure that implements the plugin, should be right type for the kind of plugin
	PluginInstance() interface{}

	// PluginName is a human friendly name for the plugin
	PluginName() string

	// PluginType is the type of the plugin, to match inter.PluginType
	PluginType() inter.PluginType

	// PluginVersion is the version of the plugin
	PluginVersion() string
}

Pluggable is a Choria Plugin

type Plugin

type Plugin struct {
	Name string
	Repo string
}

Plugin is an individual plugin

func (*Plugin) Loader

func (p *Plugin) Loader() (string, error)

Loader is the loader go code

func (*Plugin) Now

func (p *Plugin) Now() string

Now is the current time

Jump to

Keyboard shortcuts

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