resource_command

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCommandIdRequired = errors.New("command_id is required")

ErrCommandIdRequired is returned when command_id is empty.

View Source
var ErrCommandNotFound = errors.New("command not found")

ErrCommandNotFound is returned when a command is not found.

View Source
var ErrCommandRequired = errors.New("command is required")

ErrCommandRequired is returned when command is nil.

View Source
var ErrMultipleActiveRegistrations = errors.New("multiple active command registrations")

ErrMultipleActiveRegistrations is returned when more than one registration is active.

View Source
var ErrNoHandler = errors.New("command has no handler")

ErrNoHandler is returned when a command has no handler.

View Source
var ErrRegistrationNotFound = errors.New("command registration not found")

ErrRegistrationNotFound is returned when a registration is not found.

View Source
var ErrResourceIdRequired = errors.New("resource_id is required")

ErrResourceIdRequired is returned when resource_id is empty.

Functions

This section is empty.

Types

type CommandsManager

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

CommandsManager provides an in-memory command registry. Plugins register commands via RegisterCommand and watch for changes via WatchCommands.

func NewCommandsManager

func NewCommandsManager() *CommandsManager

NewCommandsManager creates a new CommandsManager.

func (*CommandsManager) GetMux

func (r *CommandsManager) GetMux() srpc.Invoker

GetMux returns the rpc mux.

func (*CommandsManager) GetSubItems

GetSubItems returns sub-items for the active registration of a command.

func (*CommandsManager) InvokeCommand

InvokeCommand invokes a registered command.

func (*CommandsManager) RegisterCommand

RegisterCommand registers a command with an optional handler.

func (*CommandsManager) SetActive

SetActive sets the active state of a registration.

func (*CommandsManager) SetEnabled

SetEnabled sets the enabled state of a registration.

func (*CommandsManager) WatchCommands

WatchCommands streams the full command registry with active state.

Jump to

Keyboard shortcuts

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