Documentation
¶
Index ¶
Constants ¶
View Source
const IOCommandStderrBufSize = 1024
Variables ¶
View Source
var ChunkBufSize uint32 = 32 * 1024
View Source
var ChunkHeaderByteOrder = binary.LittleEndian
Functions ¶
Types ¶
type ByteCounterReader ¶
type ByteCounterReader struct {
// contains filtered or unexported fields
}
func NewByteCounterReader ¶
func NewByteCounterReader(reader io.ReadCloser) *ByteCounterReader
func (*ByteCounterReader) Bytes ¶
func (b *ByteCounterReader) Bytes() int64
func (*ByteCounterReader) Close ¶
func (b *ByteCounterReader) Close() error
func (*ByteCounterReader) SetCallback ¶
func (b *ByteCounterReader) SetCallback(every time.Duration, cb func(full int64))
type ChainedReader ¶
func NewChainedReader ¶
func NewChainedReader(reader ...io.Reader) *ChainedReader
type Chunker ¶
type Chunker struct {
ChunkCount int
// contains filtered or unexported fields
}
func NewChunker ¶
type IOCommand ¶
type IOCommand struct {
Cmd *exec.Cmd
Stdin io.WriteCloser
Stdout io.ReadCloser
StderrBuf *bytes.Buffer
ExitResult *IOCommandExitResult
// contains filtered or unexported fields
}
An IOCommand exposes a forked process's std(in|out|err) through the io.ReadWriteCloser interface.
func NewIOCommand ¶
func RunIOCommand ¶
func (*IOCommand) Close ¶
Terminate the child process and collect its exit status It is safe to call Close() multiple times.
type IOCommandError ¶
func (IOCommandError) Error ¶
func (e IOCommandError) Error() string
type IOCommandExitResult ¶
type IOCommandExitResult struct {
Error error
WaitStatus syscall.WaitStatus
}
type NetConnLogger ¶
func NewNetConnLogger ¶
func NewNetConnLogger(conn net.Conn, readlog, writelog string) (l *NetConnLogger, err error)
func (*NetConnLogger) Close ¶
func (c *NetConnLogger) Close() (err error)
type Unchunker ¶
type Unchunker struct {
ChunkCount int
// contains filtered or unexported fields
}
func NewUnchunker ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
package chainlock implements a mutex whose Lock and Unlock methods return the lock itself, to enable chaining.
|
package chainlock implements a mutex whose Lock and Unlock methods return the lock itself, to enable chaining. |
|
package devnoop provides an io.ReadWriteCloser that never errors and always reports reads / writes to / from buffers as complete.
|
package devnoop provides an io.ReadWriteCloser that never errors and always reports reads / writes to / from buffers as complete. |
Click to show internal directories.
Click to hide internal directories.