reporter

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold added in v0.6.0

func Bold(s string) string

func Dim added in v0.6.0

func Dim(s string) string

func FormatResponse added in v0.6.0

func FormatResponse(r response.Response, longRequest time.Duration) string

Types

type HTTPStats

type HTTPStats struct {
	Start            time.Time
	StatusCodes      map[int]int
	InvalidInputData map[string][]string
	Errors           int
	Responses        int
	ShownResponses   int
	Count            int
	// contains filtered or unexported fields
}

HTTPStats collects statistics about several HTTP responses.

func (*HTTPStats) Report

func (h *HTTPStats) Report(last []string) (res []string)

Report returns a report about the received HTTP status codes.

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter prints the Responses to a terminal.

func New

func New(term cli.Terminal, longRequest time.Duration, printRequestAndResponse bool, showValues []bool) *Reporter

New returns a new reporter. For requests which took longer than longRequest to process, the time is shown.

func (*Reporter) Display

func (r *Reporter) Display(ch <-chan response.Response, countChannel <-chan int) error

Display shows incoming Responses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL