Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseCache ¶
type ResponseCache struct { GetKey func(r *http.Request) string // contains filtered or unexported fields }
func NewResponseCache ¶
func NewResponseCache(expiration, cleanup time.Duration) *ResponseCache
func (*ResponseCache) Get ¶
Get attempts to retrieve a http.Response from the cache for the request r. On return, key holds the key used to store the response (to be passed to Put), resp contains the cached response (if found) and ok indicates if the response was found in the cache.
Clients must call resp.Body.Close when finished reading resp.Body. After that call, clients can inspect resp.Trailer to find key/value pairs included in the response trailer.
type RoundTripper ¶
type RoundTripper struct {
// contains filtered or unexported fields
}
func NewRoundTripper ¶
func NewRoundTripper(expiry, cleanup time.Duration, next http.RoundTripper) *RoundTripper
func (*RoundTripper) Collect ¶
func (r *RoundTripper) Collect(ch chan<- prometheus.Metric)
func (*RoundTripper) Describe ¶
func (r *RoundTripper) Describe(ch chan<- *prometheus.Desc)
Click to show internal directories.
Click to hide internal directories.