engine

package
v0.0.131-smrctl Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdSource

type CmdSource interface {
	ToCmdArgs() ([]string, error)
	String() string
}

type Engine

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

func NewEngineFromSliceWithOptions

func NewEngineFromSliceWithOptions(cmdParts []string, options Options) *Engine

func NewEngineWithOptions

func NewEngineWithOptions(binary string, options Options) *Engine

func (*Engine) GetStderr

func (e *Engine) GetStderr() string

func (*Engine) GetStdout

func (e *Engine) GetStdout() string

func (*Engine) Run

func (e *Engine) Run(t *testing.T, command ...CmdSource) error

func (*Engine) RunAndCapture

func (e *Engine) RunAndCapture(t *testing.T, command ...CmdSource) (string, error)

func (*Engine) RunBackground

func (e *Engine) RunBackground(t *testing.T, command ...CmdSource) error

func (*Engine) SetFailOnError

func (e *Engine) SetFailOnError(failOnError bool)

func (*Engine) Stop

func (e *Engine) Stop(t *testing.T) error

func (*Engine) StopWithError

func (e *Engine) StopWithError() error

type Options

type Options struct {
	FailOnError bool
	Suffix      string
}

func DefaultEngineOptions

func DefaultEngineOptions() Options

type SliceCmd

type SliceCmd []string

func (SliceCmd) String

func (s SliceCmd) String() string

func (SliceCmd) ToCmdArgs

func (s SliceCmd) ToCmdArgs() ([]string, error)

type StringCmd

type StringCmd string

func NewStringCmd

func NewStringCmd(command string, args ...any) StringCmd

func (StringCmd) String

func (s StringCmd) String() string

func (StringCmd) ToCmdArgs

func (s StringCmd) ToCmdArgs() ([]string, error)

Jump to

Keyboard shortcuts

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