syncd: github.com/dreamans/syncd/util/command Index | Files

package command

import "github.com/dreamans/syncd/util/command"

Index

Package Files

command.go task.go

Constants

const (
    DEFAULT_RUM_TIMEOUT = 3600
)

type Command Uses

type Command struct {
    Cmd           string
    Timeout       time.Duration
    TerminateChan chan int
    Setpgid       bool
    // contains filtered or unexported fields
}

func NewCmd Uses

func NewCmd(c *Command) (*Command, error)

func (*Command) Run Uses

func (c *Command) Run() error

func (*Command) Stderr Uses

func (c *Command) Stderr() string

func (*Command) Stdout Uses

func (c *Command) Stdout() string

type Task Uses

type Task struct {
    Commands []string
    // contains filtered or unexported fields
}

func NewTask Uses

func NewTask(cmds []string, timeout int) *Task

func (*Task) GetError Uses

func (t *Task) GetError() error

func (*Task) Result Uses

func (t *Task) Result() []*TaskResult

func (*Task) Run Uses

func (t *Task) Run()

func (*Task) Terminate Uses

func (t *Task) Terminate()

type TaskResult Uses

type TaskResult struct {
    Cmd     string `json:"cmd"`
    Stdout  string `json:"stdout"`
    Stderr  string `json:"stderr"`
    Success bool   `json:"success"`
}

Package command imports 7 packages (graph) and is imported by 4 packages. Updated 2019-03-30. Refresh now. Tools for package owners.