command

package
v0.5.61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorCommandTimeout = fmt.Errorf("Command timed out before completing")

Functions

This section is empty.

Types

type Command

type Command interface {
	Execute(config types.CommandConfig) (int, error)
	Kill(pid int) error
}

func NewCommand

func NewCommand(maxCommandTime time.Duration, l logger.Logger) Command

NewCommand creates a new command with the given logger and maximum command time

type CommandImpl

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

Command executes local commands

func (*CommandImpl) Execute

func (c *CommandImpl) Execute(config types.CommandConfig) (int, error)

Execute the given command

func (*CommandImpl) Kill

func (c *CommandImpl) Kill(pid int) error

Kill a process with the given pid

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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