Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Incr ¶
func Incr(dbackend *DeltaBackend, dglb *DeltaGlb)
Types ¶
type BackendCounter ¶
type BackendCounter struct { ActiveClients uint `json:"active_clients"` // active clients RxBytes uint64 `json:"rx_bytes"` // nb of received bytes TxBytes uint64 `json:"tx_bytes"` // nb of transmitted bytes Requests uint64 `json:"requests"` // nb of requests RxRate uint `json:"rx_rate"` // received bytes / second TxRate uint `json:"tx_rate"` // transmitted bytes / second ReqRate uint `json:"requests_rate"` // requests / second // contains filtered or unexported fields }
BackendCounter hold one upstream-backend's current statistics
func (*BackendCounter) MarshalJSON ¶
func (c *BackendCounter) MarshalJSON() ([]byte, error)
type BackendCounterAlias ¶
type BackendCounterAlias BackendCounter
type DeltaBackend ¶
type GlobalCounter ¶
type GlobalCounter struct { RxBytes uint64 `json:"rx_bytes"` // nb of received bytes TxBytes uint64 `json:"tx_bytes"` // nb of transmitted bytes Requests uint64 `json:"requests"` // nb of client requests Fails uint64 `json:"fails"` // nb of failed requesets RxRate uint `json:"rx_rate"` // received bytes / second TxRate uint `json:"tx_rate"` // transmitted bytes / second ReqRate uint `json:"requests_rate"` // requests / second FailRate uint `json:"fails_rate"` // failed requests / second // contains filtered or unexported fields }
GlobalCounter hold current global statistics
func (*GlobalCounter) MarshalJSON ¶
func (c *GlobalCounter) MarshalJSON() ([]byte, error)
type GlobalCounterAlias ¶
type GlobalCounterAlias GlobalCounter
type Stats ¶
type Stats struct { Global *GlobalCounter `json:"global"` // global counter Upstream UpstreamCounter `json:"upstream"` // upstream -> backend -> counter // contains filtered or unexported fields }
Stats holds all of statistics data.
type UpstreamCounter ¶
type UpstreamCounter map[string]map[string]*BackendCounter
UpstreamCounter hold upstream & backends current statistics
func UpstreamStats ¶
func UpstreamStats() UpstreamCounter
Click to show internal directories.
Click to hide internal directories.