ibex

package
v0.0.0-...-5655933 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Locals = &LocalTasksT{M: make(map[int64]*Task)}

Functions

func CmdKill

func CmdKill(cmd *exec.Cmd) error

func CmdStart

func CmdStart(cmd *exec.Cmd) error

func Start

func Start()

func Stop

func Stop()

Types

type LocalTasksT

type LocalTasksT struct {
	M map[int64]*Task
}

func (*LocalTasksT) AssignTask

func (lt *LocalTasksT) AssignTask(at types.AssignTask)

func (*LocalTasksT) Clean

func (lt *LocalTasksT) Clean(assigned map[int64]struct{})

func (*LocalTasksT) GetTask

func (lt *LocalTasksT) GetTask(id int64) (*Task, bool)

func (*LocalTasksT) ReportTasks

func (lt *LocalTasksT) ReportTasks() []types.ReportTask

func (*LocalTasksT) SetTask

func (lt *LocalTasksT) SetTask(t *Task)

type Task

type Task struct {
	sync.Mutex

	Id     int64
	Clock  int64
	Action string
	Status string

	Cmd    *exec.Cmd
	Stdout bytes.Buffer
	Stderr bytes.Buffer
	Stdin  *bytes.Reader

	Args     string
	Account  string
	StdinStr string
	// contains filtered or unexported fields
}

func (*Task) GetAlive

func (t *Task) GetAlive() bool

func (*Task) GetStatus

func (t *Task) GetStatus() string

func (*Task) GetStderr

func (t *Task) GetStderr() string

func (*Task) GetStdout

func (t *Task) GetStdout() string

func (*Task) ResetBuff

func (t *Task) ResetBuff()

func (*Task) SetAlive

func (t *Task) SetAlive(pa bool)

func (*Task) SetStatus

func (t *Task) SetStatus(status string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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