Documentation ¶
Index ¶
- func CheckStorage(s *Storage) (bool, error)
- func IsDeadlineExceeded(err error) bool
- func SetGlobalExecOutput(f func(num int, line []byte))
- func SetGlobalExecUser(user string)
- func SetGlobalExecWorkDir(dir string)
- func SetGlobalIDCreator(creator IDCreator)
- func SetGlobalShell(shell *shell.Shell)
- func SetGlobalStorage(storage *Storage)
- type Exec
- func (e *Exec) AddCommand(name string, args ...string) error
- func (e *Exec) AddRawCommand(raw []byte) error
- func (e *Exec) Cancel() error
- func (e *Exec) Finished() bool
- func (e *Exec) GetLastWorkDir() string
- func (e *Exec) ID() string
- func (e *Exec) Run(command ...string) error
- func (e *Exec) String() string
- type ExecError
- type ExecOptions
- type IDCreator
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckStorage ¶ added in v0.1.3
func IsDeadlineExceeded ¶
func SetGlobalExecOutput ¶ added in v0.1.2
SetGlobalExecOutput Sets the output func for execution globally. If the output func has been set separately, it will not be overwritten.
func SetGlobalExecUser ¶ added in v0.1.2
func SetGlobalExecUser(user string)
SetGlobalExecUser Sets the user for execution globally. If the user has been set separately, it will not be overwritten.
func SetGlobalExecWorkDir ¶ added in v0.1.2
func SetGlobalExecWorkDir(dir string)
SetGlobalExecWorkDir Sets the working directory for execution globally. If the working directory has been set separately, it will not be overwritten.
func SetGlobalIDCreator ¶ added in v0.1.2
func SetGlobalIDCreator(creator IDCreator)
SetGlobalIDCreator Sets the ID Creator for execution globally. If the ID Creator has been set separately, it will not be overwritten.
func SetGlobalShell ¶ added in v0.1.2
SetGlobalShell Sets the shell for execution globally. If the shell has been set separately, it will not be overwritten.
func SetGlobalStorage ¶ added in v0.1.2
func SetGlobalStorage(storage *Storage)
SetGlobalStorage Sets the storage for execution globally. If the storage has been set separately, it will not be overwritten.
Types ¶
type Exec ¶
type Exec struct {
// contains filtered or unexported fields
}
func NewExec ¶
func NewExec(execOpts ...*ExecOptions) (*Exec, error)
func NewExecContext ¶ added in v0.1.3
func NewExecContext(ctx context.Context, execOpts ...*ExecOptions) (*Exec, error)
func (*Exec) AddRawCommand ¶
func (*Exec) GetLastWorkDir ¶ added in v0.1.3
type ExecOptions ¶
type ExecOptions struct { IDCreator IDCreator Shell *shell.Shell Storage *Storage User string WorkDir string Output func(num int, line []byte) }
func GlobalExecOptionsOverwrite ¶ added in v0.1.3
func GlobalExecOptionsOverwrite(opts ...*ExecOptions) *ExecOptions
func (*ExecOptions) Copy ¶ added in v0.1.3
func (e *ExecOptions) Copy() *ExecOptions