go-choria: github.com/choria-io/go-choria/plugin Index | Files

package plugin

import "github.com/choria-io/go-choria/plugin"


Package Files

agent_plugin.go agent_provider_plugin.go configmutator_plugin.go generator.go plugin.go provision_target_resolver_plugin.go template.go watcher_plugin.go

func Generate Uses

func Generate() bool

func Register Uses

func Register(name string, plugin Pluggable) error

Register registers a type of plugin into the choria server

type List Uses

type List struct {
    Plugins []*Plugin

List is a list of plugins to load

func Load Uses

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

Load loads a plugin list from file

type Pluggable Uses

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 Uses

type Plugin struct {
    Name string
    Repo string

Plugin is an individual plugin

func (*Plugin) Loader Uses

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

Loader is the loader go code

func (*Plugin) Now Uses

func (p *Plugin) Now() string

Now is the current time

type Type Uses

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

    // AgentPlugin is a type of agent

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

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

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

Package plugin imports 19 packages (graph) and is imported by 11 packages. Updated 2021-01-24. Refresh now. Tools for package owners.