Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
Component implements the settings.Component interface for connection state monitoring.
type Config ¶
type Config struct {
NewCounter string `description:"Name of the counter metric tracking new clients."`
NewGauge string `description:"Name of the gauge metric tracking new clients."`
ActiveCounter string `description:"Name of the counter metric tracking active clients."`
ActiveGauge string `description:"Name of the gauge metric tracking active clients."`
IdleCounter string `description:"Name of the counter metric tracking idle clients."`
IdleGauge string `description:"Name of the gauge metric tracking idle clients."`
ClosedCounter string `description:"Name of the counter metric tracking closed clients."`
HijackedCounter string `description:"Name of the counter metric tracking hijacked clients."`
ReportInterval time.Duration `description:"Interval on which gauges are reported."`
}
Config is a container for internal metrics settings.
func (*Config) Description ¶
Description returns the help information for the configuration root.
type ConnState ¶
type ConnState struct {
Stat stat.Stat
Tracking *sync.Map
NewClientCounterName string
NewClientGaugeName string
ActiveClientCounterName string
ActiveClientGaugeName string
IdleClientCounterName string
IdleClientGaugeName string
ClosedClientCounterName string
HijackedClientCounterName string
Interval time.Duration
// contains filtered or unexported fields
}
ConnState plugs into the http.Server.ConnState attribute to track the number of client connections to the server.
func (*ConnState) HandleEvent ¶
HandleEvent tracks state changes of a connection.
Click to show internal directories.
Click to hide internal directories.