exec

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package exec - Content managed by Project Forge, see [projectforge.md] for details.

Package exec - Content managed by Project Forge, see [projectforge.md] for details.

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) 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