actCmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActCommand

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

func NewActCommand

func NewActCommand(env *conf.ActEnviron, callSubCommand []string, workingDir string) *ActCommand

func (*ActCommand) Call

func (a *ActCommand) Call(ctx context.Context) (CommandOutput, error)

type ActOutput

type ActOutput struct {
	ProgramErrorChan chan error
	// contains filtered or unexported fields
}

func (*ActOutput) AddOutput

func (out *ActOutput) AddOutput(ctx context.Context, line []byte, type_ ProcessOutType)

func (*ActOutput) Close

func (out *ActOutput) Close()

func (*ActOutput) GetExitCode

func (out *ActOutput) GetExitCode() chan int

func (*ActOutput) GetOutputChan

func (out *ActOutput) GetOutputChan() chan SingleOutput

func (*ActOutput) ProgramError

func (out *ActOutput) ProgramError() chan error

func (*ActOutput) SetExitCode

func (out *ActOutput) SetExitCode(val int)

type CommandOutput

type CommandOutput interface {
	AddOutput(ctx context.Context, line []byte, type_ ProcessOutType)
	SetExitCode(val int)

	GetExitCode() chan int
	ProgramError() chan error
	GetOutputChan() chan SingleOutput

	Close()
}

func NewActOutput

func NewActOutput(ctx context.Context, cmd *exec.Cmd) CommandOutput

type ProcessOutType

type ProcessOutType int
const (
	StdErr ProcessOutType = 1
	StdOut ProcessOutType = 2
)

type SingleOutput

type SingleOutput struct {
	T    ProcessOutType
	Time time.Time
	// contains filtered or unexported fields
}

func (*SingleOutput) FormatRead

func (s *SingleOutput) FormatRead() string

func (*SingleOutput) Line

func (s *SingleOutput) Line() string

func (*SingleOutput) SetLine

func (s *SingleOutput) SetLine(line []byte)

Jump to

Keyboard shortcuts

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