Documentation
¶
Index ¶
Constants ¶
const MaxReplayBytes = 256 << 20
const MaxReplayLineBytes = 8 << 20
const MaxReplayRecords = 10_000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReplayBrowser ¶ added in v1.8.0
type ReplayEnvelope ¶ added in v1.8.0
type ReplayEnvelope struct {
Version int `json:"version"`
RunID string `json:"run_id"`
Sequence uint64 `json:"sequence"`
StartedAt time.Time `json:"started_at"`
Replayable bool `json:"replayable"`
Reason string `json:"reason,omitempty"`
Request *ReplayRequest `json:"request,omitempty"`
}
ReplayEnvelope is the versioned, credential-excluding dispatch snapshot.
type ReplayGRPC ¶ added in v1.8.0
type ReplayHTTP ¶ added in v1.8.0
type ReplayRecord ¶ added in v1.8.0
type ReplayRecord struct {
Line int
URL string
Type string
Status int
Envelope ReplayEnvelope
}
func DecodeReplayRecord ¶ added in v1.8.0
func DecodeReplayRecord(line []byte) (ReplayRecord, error)
DecodeReplayRecord validates one executable record without performing I/O.
func ReadReplay ¶ added in v1.8.0
func ReadReplay(r io.Reader) ([]ReplayRecord, error)
ReadReplay preflights the entire bounded input, returning dispatch order.
type ReplayRequest ¶ added in v1.8.0
type ReplayRequest struct {
URL string `json:"url"`
Type string `json:"type"`
HTTP *ReplayHTTP `json:"http,omitempty"`
Browser *ReplayBrowser `json:"browser,omitempty"`
DNS *ReplayDNS `json:"dns,omitempty"`
WebSocket *ReplayWebSocket `json:"websocket,omitempty"`
GRPC *ReplayGRPC `json:"grpc,omitempty"`
}
ReplayRequest deliberately cannot represent auth, headers or variable files.
func (ReplayRequest) Task ¶ added in v1.8.0
func (r ReplayRequest) Task() task.Task
Task converts a validated snapshot without loading configuration or templates.
type ReplayWebSocket ¶ added in v1.8.0
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer serialises task.Result values to a file in JSONL or CSV format. Send is non-blocking; results are dropped (with a warning) if the internal buffer is full. Close drains the buffer and flushes the file.