executil

package
v0.0.0-...-12b6483 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncCommand

type AsyncCommand struct {
	Name      string
	Arguments []string

	ExitCode int

	IsRunning    bool
	IsSuccessful bool
	CommandError error
	// contains filtered or unexported fields
}

func NewAsyncCommand

func NewAsyncCommand(stdout func(str string), stderr func(str string), workingDirectory string, environment []string, name string, arguments ...string) AsyncCommand

func (*AsyncCommand) Kill

func (cmd *AsyncCommand) Kill() error

type AsyncCommandHandler

type AsyncCommandHandler struct {
}

func GetAsyncCommandHandler

func GetAsyncCommandHandler() AsyncCommandHandler

func (AsyncCommandHandler) ExecuteAsync

func (h AsyncCommandHandler) ExecuteAsync(cmd *AsyncCommand) error

type AsyncHandler

type AsyncHandler interface {
	ExecuteAsync(command *AsyncCommand)
}

type Command

type Command struct {
	Name      string
	Arguments []string

	Stdout   bytes.Buffer
	Stderr   bytes.Buffer
	ExitCode int

	IsSuccessful bool
	CommandError error
}

func NewCommand

func NewCommand(name string, arguments ...string) Command

type CommandHandler

type CommandHandler struct {
}

func GetCommandHandler

func GetCommandHandler() CommandHandler

func (CommandHandler) Execute

func (h CommandHandler) Execute(cmd *Command)

type Handler

type Handler interface {
	Execute(command *Command)
}

Jump to

Keyboard shortcuts

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