exec

package
v0.9.26 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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 ...func(key string, b []byte) error) 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 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, error)

Jump to

Keyboard shortcuts

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