http

package
v0.0.0-...-e917273 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxConns     *int    `yaml:"maxConns,omitempty"`
	MaxIdleConns *int    `yaml:"maxIdleConns,omitempty"`
	Count        int     `yaml:"count"`
	Payload      Payload `yaml:"payload"`
}

Config is used for configuring a HTTP load test.

type Payload

type Payload struct {
	URL        string       `yaml:"url"`
	Header     ghttp.Header `yaml:"header"`
	Method     string       `yaml:"method"`
	Body       []byte       `yaml:"body,omitempty"`
	BodyFile   *string      `yaml:"bodyFile,omitempty"`
	BodyBase64 string       `yaml:"bodyBase64,omitempty"`
}

Payload is a payload for a HTTP load test.

func (*Payload) Request

func (p *Payload) Request(ctx context.Context) (*ghttp.Request, error)

Request returns a new http.Request from a payload config.

Jump to

Keyboard shortcuts

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