Documentation ¶
Index ¶
- func NewFilterWriter(filter *Filter, outputBuffer io.Writer) io.WriteCloser
- type EndSessionHandler
- type Expect
- type ExpectStream
- func (es *ExpectStream) AddExpectInTrigger(expect *Expect)
- func (es *ExpectStream) AddExpectOutTrigger(expect *Expect, serial bool)
- func (es *ExpectStream) Close()
- func (es *ExpectStream) SetBufferSize(size int)
- func (es *ExpectStream) SetShellExitCommand(command string)
- func (es *ExpectStream) Start()
- func (es *ExpectStream) StartAsShell()
- type Filter
- func (f *Filter) AddExcludeAfterPattern(pattern string)
- func (f *Filter) AddExcludePattern(pattern string)
- func (f *Filter) AddIncludeAfterPattern(pattern string)
- func (f *Filter) AddIncludePattern(pattern string)
- func (f *Filter) ClearPatterns()
- func (f *Filter) SetBlackHole()
- func (f *Filter) SetPassThru()
- type WriteAtBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFilterWriter ¶
func NewFilterWriter( filter *Filter, outputBuffer io.Writer, ) io.WriteCloser
Types ¶
type EndSessionHandler ¶
type EndSessionHandler func()
Call back to close sessions and streams being intercepted
type ExpectStream ¶
type ExpectStream struct {
// contains filtered or unexported fields
}
func NewExpectStream ¶
func NewExpectStream( inputStream io.Reader, outputStream io.Writer, endSession EndSessionHandler, ) ( *ExpectStream, io.ReadCloser, io.WriteCloser, )
the expect stream will search for expect patterns in the input stream and respond with commands in the output stream with a response associated with that pattern. patterns and their commands are evaluated in order.
func (*ExpectStream) AddExpectInTrigger ¶
func (es *ExpectStream) AddExpectInTrigger( expect *Expect, )
func (*ExpectStream) AddExpectOutTrigger ¶
func (es *ExpectStream) AddExpectOutTrigger( expect *Expect, serial bool, )
func (*ExpectStream) Close ¶
func (es *ExpectStream) Close()
func (*ExpectStream) SetBufferSize ¶
func (es *ExpectStream) SetBufferSize(size int)
func (*ExpectStream) SetShellExitCommand ¶
func (es *ExpectStream) SetShellExitCommand(command string)
func (*ExpectStream) Start ¶
func (es *ExpectStream) Start()
func (*ExpectStream) StartAsShell ¶
func (es *ExpectStream) StartAsShell()
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter
func (*Filter) AddExcludeAfterPattern ¶
func (*Filter) AddExcludePattern ¶
func (*Filter) AddIncludeAfterPattern ¶
func (*Filter) AddIncludePattern ¶
func (*Filter) ClearPatterns ¶
func (f *Filter) ClearPatterns()
func (*Filter) SetBlackHole ¶
func (f *Filter) SetBlackHole()
func (*Filter) SetPassThru ¶
func (f *Filter) SetPassThru()
type WriteAtBuffer ¶
type WriteAtBuffer struct {
// contains filtered or unexported fields
}
A buffer that implements the io.WriteAt interface and writing data to a internal buffer which get's written to the output when a contiguous set of bytes become available.
func NewWriteAtBuffer ¶
func NewWriteAtBuffer(data io.Writer) *WriteAtBuffer
func (*WriteAtBuffer) Close ¶
func (w *WriteAtBuffer) Close() error
Click to show internal directories.
Click to hide internal directories.