plugin

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// for plugin installation, discovery & sync on both client and server
	PluginsDir         = ".plugins"
	PluginsArchiveName = "yaml-plugins.zip"
)

Functions

func Initialize

func Initialize(pluginLogger hclog.Logger, arg ...string) (*models.PluginRepository, error)

func InstallPlugins

func InstallPlugins(conf *config.ServerConfig) error

used during server start also exposed as cmd

func Serve

func Serve(f Factory)

Serve is used to serve a new Nomad plugin

Types

type Factory

type Factory func(log hclog.Logger) interface{}

Factory returns a new plugin instance

type IPluginManager

type IPluginManager interface {
	Install(dst string, sources ...string) error
	Archive(name string) error
	UnArchive(src, dest string) error
}

type PluginManager

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

func NewPluginManager

func NewPluginManager() *PluginManager

func (*PluginManager) Archive

func (p *PluginManager) Archive(archiveName string) error

func (*PluginManager) Install

func (p *PluginManager) Install(dst string, sources ...string) error

func (*PluginManager) UnArchive

func (p *PluginManager) UnArchive(src, dest string) error

Directories

Path Synopsis
v1beta1

Jump to

Keyboard shortcuts

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