Documentation ¶
Overview ¶
Package zpages contains utilties for creating internal/debug pages to be served by a standard net/http server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Healthz ¶
type Healthz struct {
// contains filtered or unexported fields
}
Healthz renders a page that displays a health check value. By default, this handler will render ok when the server is ready to serve. It will echo the healthString url param if it is provided. Use NewHealthz() to construct this struct.
func NewHealthz ¶
NewHealthz creates a new Healthz http handler. This method accepts either 0 or 1 params and will panic on any other number of values.
NewHealthz()
or
NewHealthz("ok")
type RequestInfo ¶
type RequestInfo struct { // The time that the request was written into the store. Timestamp time.Time // The total time that it took to respond. Duration time.Duration // The http response status code. Status int Request *http.Request }
RequestInfo holds the information of a single request.
type Requestz ¶
type Requestz struct {
// contains filtered or unexported fields
}
Requestz is an http handler that renders the requestz page.
func NewRequestz ¶
func NewRequestz(additionalDataFns ...func(*RequestInfo)) (*Requestz, error)
NewRequestz creates a new Requestz handler. Additional functions can modify the current request's RequestInfo and are run in order.
func (*Requestz) Middleware ¶
Middleware allows for easy chaning of the Middleware handler.
type Statusz ¶
type Statusz struct {
// contains filtered or unexported fields
}
Statusz is a handler that renders the statusz page.
func NewStatusz ¶
NewStatusz creates a new Statusz handler. Passed in functions can add additional data to the rendered template.