Documentation ¶
Index ¶
- Variables
- type SubProcess
- func (sp *SubProcess) Close() (err error)
- func (sp *SubProcess) Echo()
- func (sp *SubProcess) Expect(expreg ...*regexp.Regexp) (matchIndex int, err error)
- func (sp *SubProcess) ExpectTimeout(timeout time.Duration, expreg ...*regexp.Regexp) (matchIndex int, err error)
- func (sp *SubProcess) Interact() (err error)
- func (sp *SubProcess) InteractTimeout(d time.Duration) (err error)
- func (sp *SubProcess) NoEcho()
- func (sp *SubProcess) Read(b []byte) (n int, err error)
- func (sp *SubProcess) Send(response string) (err error)
- func (sp *SubProcess) SendLine(response string) (err error)
- func (sp *SubProcess) Start() (err error)
- func (sp *SubProcess) Terminate() error
- func (sp *SubProcess) Wait() error
- func (sp *SubProcess) WaitTimeout(d time.Duration) (err error)
- func (sp *SubProcess) Write(b []byte) (n int, err error)
- func (sp *SubProcess) Writeln(b []byte) (n int, err error)
- type TerminatedError
- type ValueNotBindError
- type ValueNotFoundError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EOF = errors.New("EOF") TIMEOUT = errors.New("Timeout") )
Functions ¶
This section is empty.
Types ¶
type SubProcess ¶
type SubProcess struct { Term *pty.Terminal DelayBeforeSend time.Duration CheckInterval time.Duration Before []byte After []byte Match []byte // contains filtered or unexported fields }
func NewSubProcess ¶
func NewSubProcess(name string, arg ...string) (sp *SubProcess, err error)
func (*SubProcess) Close ¶
func (sp *SubProcess) Close() (err error)
func (*SubProcess) Echo ¶
func (sp *SubProcess) Echo()
func (*SubProcess) Expect ¶
func (sp *SubProcess) Expect(expreg ...*regexp.Regexp) (matchIndex int, err error)
func (*SubProcess) ExpectTimeout ¶
func (*SubProcess) Interact ¶
func (sp *SubProcess) Interact() (err error)
func (*SubProcess) InteractTimeout ¶
func (sp *SubProcess) InteractTimeout(d time.Duration) (err error)
func (*SubProcess) NoEcho ¶
func (sp *SubProcess) NoEcho()
func (*SubProcess) Send ¶
func (sp *SubProcess) Send(response string) (err error)
func (*SubProcess) SendLine ¶
func (sp *SubProcess) SendLine(response string) (err error)
func (*SubProcess) Start ¶
func (sp *SubProcess) Start() (err error)
func (*SubProcess) Terminate ¶
func (sp *SubProcess) Terminate() error
func (*SubProcess) Wait ¶
func (sp *SubProcess) Wait() error
func (*SubProcess) WaitTimeout ¶
func (sp *SubProcess) WaitTimeout(d time.Duration) (err error)
type TerminatedError ¶
type TerminatedError struct {
Message string
}
func (TerminatedError) Error ¶
func (e TerminatedError) Error() string
type ValueNotBindError ¶
type ValueNotBindError struct {
VarName string
}
func (ValueNotBindError) Error ¶
func (e ValueNotBindError) Error() string
type ValueNotFoundError ¶
type ValueNotFoundError struct {
VarName string
}
func (ValueNotFoundError) Error ¶
func (e ValueNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.