exec

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Jump to

Keyboard shortcuts

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