Documentation
¶
Overview ¶
Package recorder implements session recorder - it captures all the output that can be later replayed in terminals
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct {
// Data is a captured terminal data
Data []byte `json:"data"`
// Delay is delay before the previous chunk appeared
Delay time.Duration `json:"delay"`
// ServerID is a server ID of the recorded session
ServerID string `json:"server_id"`
}
Chunk is a piece of recorded session on some node
type ChunkReadCloser ¶
type ChunkReadCloser interface {
ChunkReader
io.Closer
}
ChunkReadCloser implements chunk reader + adds closer
type ChunkReadWriteCloser ¶
type ChunkReadWriteCloser interface {
ChunkReader
ChunkWriter
io.Closer
}
ChunkReadWriteCloser is a chunk reader, writer and closer interfaces
type ChunkReader ¶
type ChunkReader interface {
// ReadChunks returns a list of chunks from start to end indexes
ReadChunks(start int, end int) ([]Chunk, error)
GetChunksCount() (uint64, error)
}
ChunkReader is a playback of a recorded session
type ChunkWriteCloser ¶
type ChunkWriteCloser interface {
ChunkWriter
io.Closer
}
ChunkWriteCloser is a chunk writer with Closer interface
type ChunkWriter ¶
type ChunkWriter interface {
// WriteChunks stores recorded chunks in the registry
WriteChunks([]Chunk) error
}
ChunkWriter is a session recorder
type Recorder ¶
type Recorder interface {
// GetChunkWriter returns a new writer that can record
// chunks with active session data to the recording server
GetChunkWriter(id string) (ChunkWriteCloser, error)
// GetChunkReader returns a reader of recorded chunks
GetChunkReader(id string) (ChunkReadCloser, error)
}
Recorder is a session recoreder and playback interface
Click to show internal directories.
Click to hide internal directories.