executor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args []string

func (*Args) AddArgs

func (args *Args) AddArgs(arguments ...string)

func (*Args) AddKV

func (args *Args) AddKV(key, value string)

type EnvMap

type EnvMap map[string]string

type Executor

type Executor interface {
	Run(ctx context.Context, args Args, params RunParams) error
}

func New

func New(executable string, opts ...Opt) (Executor, error)

type Logger

type Logger interface {
	Info(s string)
	Debug(s string)
}

type Opt

type Opt interface {
	// contains filtered or unexported methods
}

func WithEnv

func WithEnv(env []string) Opt

func WithEnvMap

func WithEnvMap(envMap EnvMap) Opt

func WithLogger

func WithLogger(logger Logger) Opt

type RunParams

type RunParams struct {
	Stdin  maybe.Maybe[io.Reader]
	Stdout maybe.Maybe[io.Writer]
	Stderr maybe.Maybe[io.Writer]
}

Jump to

Keyboard shortcuts

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