recorder

package
v0.1.0-alpha.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

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"`
	// TerminalParams contains terminal params
	TerminalParams session.TerminalParams `json:"term"`
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL