Documentation ¶
Index ¶
- Variables
- func CreateRunnableFile(dir string, cmd string, params ...string) (string, error)
- type ConsoleProgram
- func (instance *ConsoleProgram) ErrorWriterAppend(w io.Writer)
- func (instance *ConsoleProgram) InputAppend(args ...string)
- func (instance *ConsoleProgram) OutWriterAppend(w io.Writer)
- func (instance *ConsoleProgram) Prepare(args ...string) (session *ConsoleProgramSession, err error)
- func (instance *ConsoleProgram) Run(args ...string) (*ConsoleProgramSession, error)
- func (instance *ConsoleProgram) RunAsync(args ...string) (*ConsoleProgramSession, error)
- func (instance *ConsoleProgram) RunWrapped(args ...string) (*ConsoleProgramSession, error)
- func (instance *ConsoleProgram) SetDir(dir string)
- func (instance *ConsoleProgram) SetFileName(filename string)
- type ConsoleProgramSession
- func (instance *ConsoleProgramSession) Close()
- func (instance *ConsoleProgramSession) GoString() string
- func (instance *ConsoleProgramSession) Kill() (err error)
- func (instance *ConsoleProgramSession) PidCurrent() int
- func (instance *ConsoleProgramSession) PidLatest() int
- func (instance *ConsoleProgramSession) Run(args ...string) (*ConsoleProgramSession, error)
- func (instance *ConsoleProgramSession) RunAsync(args ...string) (*ConsoleProgramSession, error)
- func (instance *ConsoleProgramSession) SetDir(dir string)
- func (instance *ConsoleProgramSession) SetFileName(filename string)
- func (instance *ConsoleProgramSession) StdErr() string
- func (instance *ConsoleProgramSession) StdOut() string
- func (instance *ConsoleProgramSession) StdOutJson() interface{}
- func (instance *ConsoleProgramSession) String() string
- func (instance *ConsoleProgramSession) Wait() (err error)
- type Executor
- func (instance *Executor) Close()
- func (instance *Executor) Elapsed() int
- func (instance *Executor) ErrorWriterAppend(w io.Writer)
- func (instance *Executor) GoString() string
- func (instance *Executor) Inputs() []string
- func (instance *Executor) InputsAppend(text string)
- func (instance *Executor) IsKillable() bool
- func (instance *Executor) IsRunning() bool
- func (instance *Executor) Kill() error
- func (instance *Executor) OutWriterAppend(w io.Writer)
- func (instance *Executor) PidCurrent() int
- func (instance *Executor) PidLatest() int
- func (instance *Executor) Run(args ...string) error
- func (instance *Executor) StdErr() string
- func (instance *Executor) StdOut() string
- func (instance *Executor) StdOutLines() []string
- func (instance *Executor) StdOutMap() map[string]interface{}
- func (instance *Executor) String() string
- func (instance *Executor) Wait() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotExistsFileError = errors.New("not_exists_file") NotInstalledError = errors.New("not_installed") )
Functions ¶
Types ¶
type ConsoleProgram ¶
type ConsoleProgram struct {
// contains filtered or unexported fields
}
func NewConsoleProgram ¶
func NewConsoleProgram(command string, args ...string) *ConsoleProgram
func NewConsoleProgramWithDir ¶
func NewConsoleProgramWithDir(command string, dir string, args ...string) *ConsoleProgram
func NewConsoleProgramWithFile ¶
func NewConsoleProgramWithFile(command string, filename string, args ...string) *ConsoleProgram
func (*ConsoleProgram) ErrorWriterAppend ¶
func (instance *ConsoleProgram) ErrorWriterAppend(w io.Writer)
func (*ConsoleProgram) InputAppend ¶
func (instance *ConsoleProgram) InputAppend(args ...string)
func (*ConsoleProgram) OutWriterAppend ¶
func (instance *ConsoleProgram) OutWriterAppend(w io.Writer)
func (*ConsoleProgram) Prepare ¶
func (instance *ConsoleProgram) Prepare(args ...string) (session *ConsoleProgramSession, err error)
func (*ConsoleProgram) Run ¶
func (instance *ConsoleProgram) Run(args ...string) (*ConsoleProgramSession, error)
func (*ConsoleProgram) RunAsync ¶
func (instance *ConsoleProgram) RunAsync(args ...string) (*ConsoleProgramSession, error)
func (*ConsoleProgram) RunWrapped ¶
func (instance *ConsoleProgram) RunWrapped(args ...string) (*ConsoleProgramSession, error)
RunWrapped run program wrapped into runnable file launcher.
func (*ConsoleProgram) SetDir ¶
func (instance *ConsoleProgram) SetDir(dir string)
func (*ConsoleProgram) SetFileName ¶
func (instance *ConsoleProgram) SetFileName(filename string)
type ConsoleProgramSession ¶
type ConsoleProgramSession struct {
// contains filtered or unexported fields
}
func NewProgramSession ¶
func NewProgramSession(command, uid string, inputs []string, outWriters, errWriters []io.Writer) *ConsoleProgramSession
func (*ConsoleProgramSession) Close ¶
func (instance *ConsoleProgramSession) Close()
Close try to close gracefully sending CTRL+C command
func (*ConsoleProgramSession) GoString ¶
func (instance *ConsoleProgramSession) GoString() string
func (*ConsoleProgramSession) Kill ¶
func (instance *ConsoleProgramSession) Kill() (err error)
func (*ConsoleProgramSession) PidCurrent ¶
func (instance *ConsoleProgramSession) PidCurrent() int
func (*ConsoleProgramSession) PidLatest ¶
func (instance *ConsoleProgramSession) PidLatest() int
func (*ConsoleProgramSession) Run ¶
func (instance *ConsoleProgramSession) Run(args ...string) (*ConsoleProgramSession, error)
func (*ConsoleProgramSession) RunAsync ¶
func (instance *ConsoleProgramSession) RunAsync(args ...string) (*ConsoleProgramSession, error)
func (*ConsoleProgramSession) SetDir ¶
func (instance *ConsoleProgramSession) SetDir(dir string)
func (*ConsoleProgramSession) SetFileName ¶
func (instance *ConsoleProgramSession) SetFileName(filename string)
func (*ConsoleProgramSession) StdErr ¶
func (instance *ConsoleProgramSession) StdErr() string
func (*ConsoleProgramSession) StdOut ¶
func (instance *ConsoleProgramSession) StdOut() string
func (*ConsoleProgramSession) StdOutJson ¶
func (instance *ConsoleProgramSession) StdOutJson() interface{}
func (*ConsoleProgramSession) String ¶
func (instance *ConsoleProgramSession) String() string
func (*ConsoleProgramSession) Wait ¶
func (instance *ConsoleProgramSession) Wait() (err error)
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutorWithDir ¶
func (*Executor) Close ¶
func (instance *Executor) Close()
Close kill executable using os.Interrupt signal
func (*Executor) ErrorWriterAppend ¶
func (*Executor) InputsAppend ¶
func (*Executor) IsKillable ¶
func (*Executor) OutWriterAppend ¶
func (*Executor) PidCurrent ¶
func (*Executor) StdOutLines ¶
Click to show internal directories.
Click to hide internal directories.