plugin

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 21 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 plugin.Type
	PluginType() Type

	// 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

type Type

type Type int

Type are types of choria plugin

const (
	// UnknownPlugin is a unknown plugin type
	UnknownPlugin Type = iota

	// AgentProviderPlugin is a plugin that provide types of agents to Choria
	AgentProviderPlugin

	// AgentPlugin is a type of agent
	AgentPlugin

	// ProvisionTargetResolverPlugin is a plugin that helps provisioning mode Choria find its broker
	ProvisionTargetResolverPlugin

	// ConfigMutatorPlugin is a plugin that can dynamically adjust
	// configuration based on local site conditions
	ConfigMutatorPlugin

	// MachineWatcherPlugin is a plugin that adds a Autonomous Agent Watcher
	MachineWatcherPlugin

	// DataPlugin is a plugin that provides data to choria
	DataPlugin
)

Jump to

Keyboard shortcuts

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