Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultScriptTimeout = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶ added in v0.5.0
type ResponseKind ¶ added in v0.5.0
type ResponseKind string
const ( ResponseKindHTTP ResponseKind = "http" ResponseKindGRPC ResponseKind = "grpc" )
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewRunner ¶
func NewRunner(fs filelookup.FileSystem) *Runner
func (*Runner) RunPreRequest ¶
func (r *Runner) RunPreRequest( scripts []restfile.ScriptBlock, input prerequest.Input, ) (prerequest.Output, error)
type StreamInfo ¶ added in v0.5.0
type StreamInfo struct {
Kind string
Summary map[string]any
Events []map[string]any
// Err reports a stream that did not finish cleanly. Scripts still see the
// events that arrived.
Err error
}
StreamInfo carries streaming session data for script consumption.
func (*StreamInfo) Clone ¶ added in v0.5.0
func (info *StreamInfo) Clone() *StreamInfo
type TestInput ¶
type TestInput struct {
Response *Response
Variables map[string]string
Globals vars.Globals
BaseDir string
Stream *StreamInfo
Trace *TraceInput
Secrets *vars.Secrets
}
type TraceBudget ¶ added in v0.6.0
type TraceBudget struct {
Total time.Duration
Tolerance time.Duration
Phases map[string]time.Duration
}
TraceBudget represents optional latency budgets configured for a request.
type TraceInput ¶ added in v0.6.0
type TraceInput struct {
Timeline *nettrace.Timeline
Budgets TraceBudget
}
TraceInput carries timeline and budget information into the scripting runtime.
func NewTraceInput ¶ added in v0.6.0
func NewTraceInput(tl *nettrace.Timeline, spec *restfile.TraceSpec) *TraceInput
NewTraceInput converts a timeline/spec pair into a scripting input, cloning data to keep it immutable.
Click to show internal directories.
Click to hide internal directories.