plugin

package
v0.0.0-...-e25a249 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugins = map[string]Plugin{
	"shell": &plugin.Shell{},
	"file":  &plugin.File{},
}

The Plugins map contain all the registered plugins, whoses names must be the same as the ones used in the deployment file.

Functions

func InitPlugins

func InitPlugins()

Load all the plugins in ./plugins (relative to the current executable directory)

Types

type Plugin

type Plugin interface {
	Execute(ctx *deployment.JobContext, data any) (string, error)
}

The Plugin interface define one method, which execute the content of the associated content in the deployment file. It return the command stdout output.

Jump to

Keyboard shortcuts

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