tsrecorder

package
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package tsrecorder contains functionality for connecting to a tsrecorder instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

recorder knows how to send the provided bytes to the configured tsrecorder instance in asciinema format.

func New

func New(conn io.WriteCloser, clock tstime.Clock, start time.Time, failOpen bool, logger *zap.SugaredLogger) *Client

func (*Client) Close

func (rec *Client) Close() error

func (*Client) WriteCastHeader added in v1.74.0

func (rec *Client) WriteCastHeader(ch sessionrecording.CastHeader) error

WriteCastHeaders writes asciinema CastHeader. This must be called once, before any payload is sent to the tsrecorder. https://docs.asciinema.org/manual/asciicast/v2/#header

func (*Client) WriteOutput added in v1.74.0

func (rec *Client) WriteOutput(p []byte) (err error)

WriteOutput sends terminal stdout and stderr to the tsrecorder. https://docs.asciinema.org/manual/asciicast/v2/#o-output-data-written-to-a-terminal

func (*Client) WriteResize added in v1.74.0

func (rec *Client) WriteResize(height, width int) (err error)

WriteResize writes an asciinema resize message. This can be called if terminal size has changed. https://docs.asciinema.org/manual/asciicast/v2/#r-resize

type ResizeMsg

type ResizeMsg struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳