Documentation ¶
Overview ¶
Package tracereplay implements a tool that can save and replay messages issued from remote.Remote.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 Save ¶
type Save struct { server.CommonServer // contains filtered or unexported fields }
Save implements the functionality required for the "save" command.
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]*