stats

package
v0.0.0-...-7f371a6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMetric

func AddMetric(name string, m Metric)

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

func Middle

func Middle(h http.Handler) http.Handler

Types

type Metric

type Metric func() map[string]uint64

type RespWriter

type RespWriter struct {
	http.ResponseWriter
	StatusHeader int
}

func (*RespWriter) WriteHeader

func (rw *RespWriter) WriteHeader(c int)

type Stats

type Stats struct {
	Methods     map[string]uint64
	StatusCodes map[string]uint64
	Users       map[string]uint64
	AllTime     float64
	AllRequests uint64
	Module      map[string]uint64
	Metrics     map[string]Metric `json:"-"`
}

Jump to

Keyboard shortcuts

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