Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIStats ¶
func APIStats(api string, f http.HandlerFunc) http.HandlerFunc
APIStats wraps http handler for api with basic statistics collection.
Types ¶
type HTTPAPIStats ¶
HTTPAPIStats holds statistics information about the API given in the requests.
func (*HTTPAPIStats) Dec ¶
func (stats *HTTPAPIStats) Dec(api string)
Dec increments the api stats counter.
func (*HTTPAPIStats) Inc ¶
func (stats *HTTPAPIStats) Inc(api string)
Inc increments the api stats counter.
func (*HTTPAPIStats) Load ¶
func (stats *HTTPAPIStats) Load() map[string]int
Load returns the recorded stats.
Click to show internal directories.
Click to hide internal directories.