api

package
v0.0.0-...-ff931c6 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2015 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Boomer

func Boomer(rw http.ResponseWriter, req *http.Request, ps httprouter.Params)

func Options

func Options(rw http.ResponseWriter, req *http.Request, ps httprouter.Params)

func UserInterface

func UserInterface(rw http.ResponseWriter, req *http.Request, ps httprouter.Params)

Types

type HTTPHeader

type HTTPHeader struct {
	// Name - "Content-Type"
	Name string `json:"name"`

	// Value - "application/json"
	Value string `json:"value"`
}

HTTPHeader ...

type Request

type Request struct {
	// url the make the requests against
	Endpoint string `json:"endpoint"`

	// number of requests to run
	Requests int `json:"requests"`

	// number of requests to run concurrently. Total number
	// of requests cannot be smaler than the concurrency level.
	ConcurrentRequests int `json:"concurrent_requests"`

	// Rate limit, in seconds (QPS)
	RateLimit int `json:"rate_limit"`

	// HTTP Method - GET POST PUT DELETE HEAD OPTIONS
	Method string `json:"method"`

	// HTTP Headers
	Headers []HTTPHeader `json:"headers"`

	// Timeout - in millieseconds
	Timeout int `json:"timeout"`

	// HTTP Accept Header
	AcceptHeader string `json:"accept"`

	// HTTP request body
	Body string `json:"body"`

	// Content-Type - defaults to "text/html"
	ContentType string `json:"content_type"`

	// Basic Authentication - username:password
	BasicAuth string `json:"basic_auth"`

	// HTTP Proxy address - host:port
	Proxy string `json:"proxy"`

	// Consumes the entire request body
	ReadAll bool `json:"read_all"`

	// Allow bad/expires TLS/SSL certificates
	AllowInsecure bool `json:"allow_insecure"`

	// Disable compression
	DisableCompression bool `json:"disable_compression"`

	// Disable keep-alive, prevents re-use of TCP connections
	// between different HTTP requests.
	DisableKeepAlive bool `json:"disable_keep_alive"`

	// NUmber of used CPU cores. (default for current machine is %d cores)
	CPUs int `json:"cpus"`

	Report *boomer.Report `json:"report"`
	// contains filtered or unexported fields
}

Request ...

func (*Request) Do

func (r *Request) Do() error

Jump to

Keyboard shortcuts

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