exec

package
v1.5.18 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 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 Exec

type Exec struct {
	Key       string        `json:"key"`
	Idx       int           `json:"idx"`
	Cmd       string        `json:"cmd"`
	Env       []string      `json:"env,omitempty"`
	Path      string        `json:"path"`
	Started   *time.Time    `json:"started"`
	PID       int           `json:"pid"`
	Completed *time.Time    `json:"completed"`
	ExitCode  int           `json:"exitCode"`
	Link      string        `json:"link,omitempty"`
	Buffer    *bytes.Buffer `json:"-"`
	// contains filtered or unexported fields
}

func NewExec

func NewExec(key string, idx int, cmd string, path string, envvars ...string) *Exec

func (*Exec) Kill

func (e *Exec) Kill() error

func (*Exec) Run added in v1.5.18

func (e *Exec) Run(fns ...OutFn) error

func (*Exec) Start

func (e *Exec) Start(fns ...OutFn) error

func (*Exec) String

func (e *Exec) String() string

func (*Exec) Wait

func (e *Exec) Wait() error

func (*Exec) WebPath

func (e *Exec) WebPath() string

type Execs

type Execs []*Exec

func (Execs) Get

func (m Execs) Get(key string, idx int) *Exec

func (Execs) GetByKey

func (m Execs) GetByKey(key string) Execs

func (Execs) Running

func (m Execs) Running() int

func (Execs) Sort

func (m Execs) Sort()

type OutFn added in v1.4.5

type OutFn func(key string, b []byte) error

type Service

type Service struct {
	Execs Execs
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) NewExec

func (s *Service) NewExec(key string, cmd string, path string, envvars ...string) *Exec

Jump to

Keyboard shortcuts

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