Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalValue ¶ added in v0.1.15
type PreRequestInput ¶
type PreRequestOutput ¶
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 httpclient.FileSystem) *Runner
func (*Runner) RunPreRequest ¶
func (r *Runner) RunPreRequest( scripts []restfile.ScriptBlock, input PreRequestInput, ) (PreRequestOutput, error)
func (*Runner) RunTests ¶
func (r *Runner) RunTests( scripts []restfile.ScriptBlock, input TestInput, ) ([]TestResult, map[string]GlobalValue, error)
type StreamInfo ¶ added in v0.5.0
type StreamInfo struct {
Kind string
Summary map[string]interface{}
Events []map[string]interface{}
}
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 map[string]GlobalValue
BaseDir string
Stream *StreamInfo
Trace *TraceInput
}
type TestResult ¶
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.