httputil

package module
v0.0.0-...-189c291 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2016 License: BSD-2-Clause Imports: 4 Imported by: 33 modules, 36 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httputil is a collection of utilities for net/http handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublishTrackedConnections

func PublishTrackedConnections(name string)

PublishTrackedConnections sets the name for the published versions of the currently executing requests list

func SlowHandler

func SlowHandler(fn http.HandlerFunc, max time.Duration, cb func(r *http.Request, t time.Duration)) http.HandlerFunc

SlowHandler wraps a http.HandlerFunc and calls cb if the request takes longer than max time to process. The function runs to completion -- slow requests are not aborted.

func TimeHandler

func TimeHandler(fn http.HandlerFunc, cb func(r *http.Request, t time.Duration)) http.HandlerFunc

TimeHandler wraps a http.HandlerFunc and calls cb with the duration.

func TrackConnections

func TrackConnections(fn http.HandlerFunc) http.HandlerFunc

TrackConnections exports via expvar a list of all currently executing requests

Types

This section is empty.

Jump to

Keyboard shortcuts

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