Documentation ¶
Index ¶
- func Bytes(t interface{}) []byte
- type Listener
- func (l *Listener) Close() error
- func (t *Listener) Interactive() error
- func (t *Listener) NewLine() byte
- func (t *Listener) RecvLine() ([]byte, error)
- func (t *Listener) RecvN(n int) ([]byte, error)
- func (t *Listener) RecvUntil(needle []byte, drop bool) ([]byte, error)
- func (t *Listener) RecvUntilWithContext(ctx context.Context, needle []byte, drop bool) ([]byte, error)
- func (t *Listener) SendLine(input interface{}) (int, error)
- func (l *Listener) WaitForConnection() error
- type Process
- func (p *Process) CWD() (string, error)
- func (t *Process) Interactive() error
- func (p *Process) Kill() error
- func (t *Process) NewLine() byte
- func (p *Process) PID() int
- func (t *Process) RecvLine() ([]byte, error)
- func (t *Process) RecvN(n int) ([]byte, error)
- func (t *Process) RecvUntil(needle []byte, drop bool) ([]byte, error)
- func (t *Process) RecvUntilWithContext(ctx context.Context, needle []byte, drop bool) ([]byte, error)
- func (t *Process) SendLine(input interface{}) (int, error)
- func (p *Process) Signal(sig os.Signal) error
- type ProcessOptions
- type Remote
- func (r *Remote) Close() error
- func (t *Remote) Interactive() error
- func (t *Remote) NewLine() byte
- func (t *Remote) RecvLine() ([]byte, error)
- func (t *Remote) RecvN(n int) ([]byte, error)
- func (t *Remote) RecvUntil(needle []byte, drop bool) ([]byte, error)
- func (t *Remote) RecvUntilWithContext(ctx context.Context, needle []byte, drop bool) ([]byte, error)
- func (t *Remote) SendLine(input interface{}) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func (*Listener) Interactive ¶
func (t *Listener) Interactive() error
Interactive allows the user to interact with the tube manually.
func (*Listener) RecvUntil ¶
RecvUntil receives data until the specified sequence of bytes is detected.
func (*Listener) RecvUntilWithContext ¶
func (t *Listener) RecvUntilWithContext(ctx context.Context, needle []byte, drop bool) ([]byte, error)
RecvUntilWithContext receives data until the specified sequence of bytes is detected or the context is done.
func (*Listener) WaitForConnection ¶
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func NewProcess ¶
func NewProcess(argv []string, optFns ...func(o *ProcessOptions)) (*Process, error)
func (*Process) Interactive ¶
func (t *Process) Interactive() error
Interactive allows the user to interact with the tube manually.
func (*Process) Kill ¶
Kill causes the Process to exit immediately. Kill does not wait until the Process has actually exited. This only kills the Process itself, not any other processes it may have started.
func (*Process) RecvUntil ¶
RecvUntil receives data until the specified sequence of bytes is detected.
func (*Process) RecvUntilWithContext ¶
func (t *Process) RecvUntilWithContext(ctx context.Context, needle []byte, drop bool) ([]byte, error)
RecvUntilWithContext receives data until the specified sequence of bytes is detected or the context is done.
type ProcessOptions ¶
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
func (*Remote) Interactive ¶
func (t *Remote) Interactive() error
Interactive allows the user to interact with the tube manually.
func (*Remote) RecvUntil ¶
RecvUntil receives data until the specified sequence of bytes is detected.