gvisorgvisor.dev/gvisor/tools/tracereplay Index | Files | Directories

package tracereplay

import "gvisor.dev/gvisor/tools/tracereplay"

Package tracereplay implements a tool that can save and replay messages issued from remote.Remote.

Index

Types

type Config

type Config struct {
	// Version is the wire format saved in the file.
	Version uint32 `json:"version"`
}

Config contains information required to replay messages from a file.

type Replay

type Replay struct {
	Endpoint string
	In       string
}

Replay implements the functionality required for the "replay" command.

func (*Replay) Execute

func (r *Replay) Execute() error

Execute connects to the remote endpoint and replays all messages stored in the `In` file.

type Save

type Save struct {
	server.CommonServer
	// contains filtered or unexported fields
}

Save implements the functionality required for the "save" command.

func NewSave

func NewSave(endpoint, dir, prefix string) *Save

NewSave creates a new Save instance.

func (*Save) NewClient

func (s *Save) NewClient() (server.MessageHandler, error)

NewClient creates a new file for the client and writes messages to it.

The file format starts with a string signature to make it easy to check that it's a trace file. The signature is followed by a JSON configuration that contains information required to process the file. Next, there are a sequence of messages. Both JSON and messages are prefixed by an uint64 with their size.

Ex: signature <size>Config JSON [<size>message]*

func (*Save) Start

func (s *Save) Start() error

Start starts the server.

Source Files

replay.go save.go tracereplay.go

Directories

PathSynopsis
tools/tracereplay/mainPackage main implements a tool that can save and replay messages from issued from remote.Remote.
Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
14 packages
Last checked
4 hours ago

Tools for package owners.