http

package
v0.0.0-...-5c982d6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package http implement gofast http endpoints, subscribed to net/http.DefaultServerMux.

import _ github.com/bnclabs/gofast/http

will automatically mount following urls:

/gofast/statistics?name=<transport-name>
/gofast/statistics?keys=n_tx,n_rx
/gofast/memstats

If `name` query-parameter is supplied, complete set of statistics for the specified <transport-name> will be returned as JSON text.

If `name` query-parameter is skipped, endpoint returns complete set of statistics for all transport objects.

If `keys` query-parameter is supplied, as comma separated values of count-name, only specified list of count values will be returned as JSON text.

Note that `name` and `keys` parameter can be mixed.

Other than supported stats keys, http response object will also include `timestamp` at which statistic was gathered.

Jump to

Keyboard shortcuts

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