Documentation ¶
Index ¶
- func IntRegexTransform(regexp *regexp.Regexp) func(body []byte) (int, error)
- func WithDecompressorTransform() func(b []byte) string
- func WithHeaderValues(header string) func(response *http.Response) []string
- func WithJsonBody() func(b []byte) map[string]interface{}
- func WithMedian() func([]time.Duration) time.Duration
- func WithPercentile(percentile int) func(durations []time.Duration) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntRegexTransform ¶
IntRegexTransform returns a function that can be used to transform a byte array (e.g., an http.Response body) into an int by applying a regular expression to the byte array. The regular expression must have exactly one capture group. The function will return the integer value of the capture group.
func WithDecompressorTransform ¶
WithDecompressorTransform returns a Gomega Transform that decompresses a slice of bytes and returns the corresponding string
func WithHeaderValues ¶
WithHeaderValues returns a Gomega Transform that extracts the header values from the http Response, for the provided header name
func WithJsonBody ¶
WithJsonBody returns a Gomega Transform that extracts the JSON body from the response and returns it as a map[string]interface{}
func WithMedian ¶ added in v1.15.0
WithMedian returns a function that extracts the value at the median from a slice of durations
func WithPercentile ¶ added in v1.15.0
WithPercentile returns a function that extracts the value at the given percentile from a slice of durations The Nearest Rank Method is used to determine percentiles (https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method) Valid inputs are 0 < n <= 100
Types ¶
This section is empty.