plugins

package
v0.1.0-beta.10 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPluginPrefix is the default prefix for the plugin binary name.
	DefaultPluginPrefix = "gtctl-"

	// PluginSearchPathsEnvKey is the environment variable key for the plugin search paths.
	// If we set this variable, the plugin manager will search the paths provided by this variable.
	// If we don't set this variable, the plugin manager will search the current working directory and the $PATH.
	PluginSearchPathsEnvKey = "GTCTL_PLUGIN_PATHS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages and executes the plugins.

func NewManager

func NewManager() (*Manager, error)

func (*Manager) Run

func (m *Manager) Run(args []string) error

Run searches for the plugin and runs it.

func (*Manager) ShouldRun

func (m *Manager) ShouldRun(name string) bool

ShouldRun returns true whether you should run the plugin.

Jump to

Keyboard shortcuts

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