Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Registry prometheus.Registerer = registry Gatherer prometheus.Gatherer = registry )
Functions ¶
Types ¶
type Config ¶
type Config struct {
URL string
// Timeout specifies a time limit for requests made by this
// Client. The timeout includes connection time, any
// redirects, and reading the response body. The timer remains
// running after Get, Head, Post, or Do return and will
// interrupt reading of the Response.Body.
// A Timeout of zero means no timeout.
Timeout time.Duration
// IdleConnTimeout is the maximum amount of time an idle
// (keep-alive) connection will remain idle before closing
// itself.
// Zero means no limit.
IdleConnTimeout time.Duration
// InsecureSkipVerify controls whether a client verifies the
// server's certificate chain and host name.
// If InsecureSkipVerify is true, TLS accepts any certificate
// presented by the server and any host name in that certificate.
InsecureSkipVerify bool
// MaxConnsPerHost optionally limits the total number of
// connections per host, including connections in the dialing,
// active, and idle states. On limit violation, dials will block.
// Zero means no limit.
MaxConnsPerHost int
// MaxIdleConns controls the maximum number of idle (keep-alive)
// connections across all hosts. Zero means no limit.
MaxIdleConns int
// MaxIdleConnsPerHost, if non-zero, controls the maximum idle
// (keep-alive) connections to keep per-host. If zero,
// DefaultMaxIdleConnsPerHost is used.
MaxIdleConnsPerHost int
Headers http.Header
}
Config ...
type Request ¶
type Request struct {
Method string
Header http.Header
URL *url.URL
Body io.Reader
Response *Response
}
Request ...
type Response ¶
type Response struct {
Status string // e.g. "200 OK"
StatusCode int // e.g. 200
Proto string // e.g. "HTTP/1.0"
ProtoMajor int // e.g. 1
ProtoMinor int // e.g. 0
Header http.Header
Body []byte
ContentLength int64
TransferEncoding []string
Uncompressed bool
Trailer http.Header
Duration time.Duration
Request *http.Request
}
Response ...
Click to show internal directories.
Click to hide internal directories.