subsystem

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Annotation is the Cobra command annotation key used to link commands to subsystems.
	Annotation = "ocm.software/subsystem"
)

Variables

This section is empty.

Functions

func FindLinkedCommands

func FindLinkedCommands(cmd *cobra.Command, subsystemName string) []*cobra.Command

FindLinkedCommands searches the command tree for all commands that are linked to the given subsystem name.

Types

type Registry

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

Registry is a central container for all registered subsystems.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new, empty SubsystemRegistry.

func NewRegistryFromPluginManager

func NewRegistryFromPluginManager(pm *manager.PluginManager) (*Registry, error)

NewRegistryFromPluginManager creates a new subsystem registry populated with all core subsystems and registers the plugin manager's schemes with each subsystem.

func (*Registry) Get

func (r *Registry) Get(name string) *Subsystem

Get retrieves a subsystem by its name.

func (*Registry) List

func (r *Registry) List() []*Subsystem

List returns all registered subsystems sorted by name.

func (*Registry) Register

func (r *Registry) Register(s *Subsystem)

Register adds a subsystem to the registry. If a subsystem with the same name exists, it is overwritten.

type Subsystem

type Subsystem struct {
	// Name is a computer-readable ID (e.g., "ocm-repository").
	Name string
	// Description is a high-level summary of the subsystem's purpose.
	Description string
	// Scheme is the runtime scheme providing the types for this subsystem.
	Scheme *runtime.Scheme
}

Subsystem represents a logical grouping of OCM types with associated documentation.

func NewSubsystem

func NewSubsystem(name, description string) *Subsystem

Jump to

Keyboard shortcuts

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