Documentation ¶
Index ¶
Constants ¶
const ( DefaultConnPerHost = 5 DefaultParallelHosts = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetParallelHosts ¶
GetParallelHosts will retrieve each target on a separate connection This uses a simple fan-out fan-in concurrency model
func (*Client) GetPathDiffOnHost ¶
func (c *Client) GetPathDiffOnHost(base string, targets []string, opts ...ParallelOption) error
GetPathDiffOnHost will send the targets to the base host on both a http2 and a h2c connection the results will be diffed this will use c.MaxConnPerHost to parallelize the paths This assumes that the host can be connected to over h2c. This will fail if attempted with a host that cannot be h2c smuggled TODO: minimize allocations here, since we explode out a lot
func (*Client) GetPathsOnHost ¶
func (c *Client) GetPathsOnHost(base string, targets []string, opts ...ParallelOption) error
GetPathsOnHost will send the targets to the base host this will use c.MaxConnPerHost to parallelize the paths This assumes that the host can be connected to over h2c. This will fail if attempted with a host that cannot be h2c smuggled TODO: minimize allocations here, since we explode out a lot
type ParallelOption ¶
type ParallelOption func(o *ParallelOptions)
func RequestHeader ¶
func RequestHeader(key string, value string) ParallelOption
func RequestMethod ¶
func RequestMethod(method string) ParallelOption
type ParallelOptions ¶
type ParallelOptions struct {
RequestMutations []RequestMutation
}
type RequestMutation ¶
type ResponseDiff ¶
type ResponseDiff struct { DeleteOnShow bool // if enabled, results will be cleared from the cache once shown // contains filtered or unexported fields }
func NewDiffer ¶
func NewDiffer(DeleteOnShow bool) *ResponseDiff
func (*ResponseDiff) ShowDiffH2C ¶
func (r *ResponseDiff) ShowDiffH2C(http2res *res)
ShowDiffH2C will show if there's a diff between the http2 and h2c responses. if the corresponding response is not cached, this does nothing
func (*ResponseDiff) ShowDiffHTTP2 ¶
func (r *ResponseDiff) ShowDiffHTTP2(http2res *res)
ShowDiffHTTP2 will show if there's a diff between the http2 and h2c responses. if the corresponding response is not cached, this does nothing