Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Component = &Stat{}
View Source
var RequestCounter uint64
Functions ¶
Types ¶
type MainStat ¶
type MainStat struct {
Start time.Time
RequestsTotal int // num requests total, anything included
LengthServed int // length total, anything included
RequestsServed map[int]int // by response code
Requests []*RequestStat // by microtime. keep last minute requests
SitesStat map[string]*SiteStat // Every site stat. referenced by ID (from config)
// contains filtered or unexported fields
}
var SystemStat *MainStat
func CreateStat ¶
func CreateStat() *MainStat
type RequestStat ¶
type RequestStat struct {
Id uint64
StartTime time.Time
Time time.Time
Hostname string
Request string
Protocol string
Method string
Code int
Length int
Duration time.Duration
IP string
Port string
Alive bool
}
func CreateRequestStat ¶
func (*RequestStat) End ¶
func (r *RequestStat) End()
func (*RequestStat) UpdateProtocol ¶
func (r *RequestStat) UpdateProtocol(protocol string)
func (*RequestStat) UpdateStat ¶
func (r *RequestStat) UpdateStat(code int, length int)
type SiteStat ¶
type SiteStat struct {
RequestsTotal int // num requests total, anything included
RequestsServed map[int]int // by response code
LengthServed int // length total, anything included
Requests []*RequestStat // the last minute requests
}
type Stat ¶
type Stat struct{}
func (*Stat) Handler ¶
func (st *Stat) Handler(handler http.HandlerFunc) http.HandlerFunc
func (*Stat) NeedHandler ¶
Click to show internal directories.
Click to hide internal directories.