Documentation
¶
Index ¶
- Constants
- type AddTrafficInPayload
- type AddTrafficOutPayload
- type CloseClientPayload
- type CloseConnectionPayload
- type CloseProxyPayload
- type Collector
- type NewClientPayload
- type NewProxyPayload
- type OpenConnectionPayload
- type ProxyStatistics
- type ProxyStats
- type ProxyTrafficInfo
- type ServerStatistics
- type ServerStats
- type StatsType
Constants ¶
View Source
const (
ReserveDays = 7
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddTrafficInPayload ¶
type AddTrafficOutPayload ¶
type CloseClientPayload ¶
type CloseClientPayload struct{}
type CloseConnectionPayload ¶
type CloseConnectionPayload struct {
ProxyName string
}
type CloseProxyPayload ¶
type Collector ¶
type Collector interface {
Mark(statsType StatsType, payload interface{})
Run() error
GetServer() *ServerStats
GetProxiesByType(proxyType string) []*ProxyStats
GetProxiesByTypeAndName(proxyType string, proxyName string) *ProxyStats
GetProxyTraffic(name string) *ProxyTrafficInfo
}
func NewInternalCollector ¶
type NewClientPayload ¶
type NewClientPayload struct{}
type NewProxyPayload ¶
type OpenConnectionPayload ¶
type OpenConnectionPayload struct {
ProxyName string
}
type ProxyStatistics ¶
type ProxyStats ¶
type ProxyTrafficInfo ¶
type ServerStatistics ¶
type ServerStatistics struct {
TotalTrafficIn metric.DateCounter
TotalTrafficOut metric.DateCounter
CurConns metric.Counter
// counter for clients
ClientCounts metric.Counter
// counter for proxy types
ProxyTypeCounts map[string]metric.Counter
// statistics for different proxies
// key is proxy name
ProxyStatistics map[string]*ProxyStatistics
}
type ServerStats ¶
Click to show internal directories.
Click to hide internal directories.