system

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SystemHandler

type SystemHandler struct {
	*common.BaseHandler
	// contains filtered or unexported fields
}

SystemHandler handles system-level commands like restart, reboot, shutdown, upgrade

func NewSystemHandler

func NewSystemHandler(cmdExecutor common.CommandExecutor, wsClient common.WSClient, ctxManager *agent.ContextManager, pool *pool.Pool, versionResolver common.VersionResolver, apiSession common.APISession) *SystemHandler

NewSystemHandler creates a new system handler. versionResolver must not be nil; pass utils.NewDefaultVersionResolver() for production. apiSession may be nil in tests; byebye will skip the server-side unregister call when absent.

func (*SystemHandler) Execute

func (h *SystemHandler) Execute(ctx context.Context, cmd string, args *common.CommandArgs) (int, string, error)

Execute runs the system command

func (*SystemHandler) Validate

func (h *SystemHandler) Validate(cmd string, args *common.CommandArgs) error

Validate checks if the arguments are valid for the command

Jump to

Keyboard shortcuts

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