command

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForkArgs

type ForkArgs struct {
	// required
	Log     logger.Logger
	Command string

	// optional
	Context             context.Context
	Args                []string
	Cwd                 string
	BaseDir             string // the base director to upload if different than dir
	Dir                 string // the directory to store logs in
	LogFilenameLabel    string
	SaveLogs            bool
	Env                 []string
	SkipBundleOnSuccess bool
	WriteToStd          bool
	ForwardInterrupt    bool
	LogFileSink         bool
	ProcessCallback     ProcessCallback
}

type ForkResult

type ForkResult struct {
	Duration       time.Duration
	LastErrorLines string
	ProcessState   *os.ProcessState
	LogFileBundle  string
}

func Fork

func Fork(args ForkArgs) (*ForkResult, error)

Fork will run a command on the current binary

func (*ForkResult) String

func (r *ForkResult) String() string

type ProcessCallback added in v0.0.63

type ProcessCallback func(process *os.Process)

type Uploader

type Uploader func(ctx context.Context, log logger.Logger, file string) (string, error)

Jump to

Keyboard shortcuts

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