plugins

package
v1.0.0-rc07 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	VerificationStatusVerified         = "verified"
	VerificationStatusUnverified       = "unverified"
	VerificationStatusChecksumMismatch = "checksum-mismatch"
	VerificationStatusError            = "verification-error"
)
View Source
const BinaryPrefix = "opencenter-"

BinaryPrefix is the expected prefix for external plugin executables.

Variables

This section is empty.

Functions

func Discover

func Discover() map[string]string

Discover returns a map of discovered plugin binary basenames to their full paths, using the same discovery rules as LoadExternalPlugins.

func DiscoverDetailed

func DiscoverDetailed() map[string]PluginInfo

DiscoverDetailed returns the discovered plugin paths and verification state.

func LoadExternalPlugins

func LoadExternalPlugins(root *cobra.Command)

LoadExternalPlugins discovers external plugin binaries and attaches them as cobra Commands to the provided root command. A plugin is any executable whose name starts with "opencenter-" located either in PATH or in the plugins dir.

Discovery locations (in order):

  1. OPENCENTER_PLUGINS_DIR (if set)
  2. <configDir>/plugins where configDir is resolved from env or default
  3. PATH entries

func SortedPluginNames

func SortedPluginNames(discovered map[string]PluginInfo) []string

SortedPluginNames returns discovered plugin names in a stable order.

Types

type PluginInfo

type PluginInfo struct {
	Path    string
	Status  string
	Message string
}

PluginInfo contains the discovered path and verification metadata for a plugin.

Jump to

Keyboard shortcuts

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