Documentation ¶
Overview ¶
Package whmon provides a means to monitor various aspects of how the request and response is going.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RequestId = webhelp.GenSym()
)
Functions ¶
func MonitorResponse ¶
MonitorResponse wraps all incoming http.ResponseWriters with a monitored ResponseWriter that keeps track of additional status information about the outgoing response. It preserves whether or not the passed in response writer is an http.Flusher, http.CloseNotifier, or an http.Hijacker. whlog.LogRequests and whfatal.Catch also do this for you.
Types ¶
type ResponseWriter ¶
type ResponseWriter interface { // Header, Write, and WriteHeader are exactly like http.ResponseWriter Header() http.Header Write([]byte) (int, error) WriteHeader(int) // WroteHeader returns true if the Header was sent out. Note that this can // happen if only Write is called. WroteHeader() bool // StatusCode returns the HTTP status code the Header sent. StatusCode() int // Written returns the total amount of bytes successfully passed through the // Write call. This does not include the header. Written() int64 }
Click to show internal directories.
Click to hide internal directories.