Documentation ¶
Overview ¶
Package latency tracks the global network connectivity statistics.
Index ¶
Constants ¶
View Source
const ( StateNameLatency = "network-latency" StateKeyLatencyData = "data" StateKeyLatencyEncoding = "encoding" StateKeyLatencyEncodingJSON = "json" )
View Source
const ( // 1 second MinGlobalMillisecondThreshold = 1000 // 7 seconds by default to reach any of the DERP servers. DefaultGlobalMillisecondThreshold = 7000 )
View Source
const Name = "network-latency"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Query query_config.Config `json:"query"` // GlobalMillisecondThreshold is the global threshold in milliseconds for the DERP latency. // If all DERP latencies are greater than this threshold, the component will be marked as failed. // If at least one DERP latency is less than this threshold, the component will be marked as healthy. GlobalMillisecondThreshold int64 `json:"global_millisecond_threshold"` }
type Output ¶
type Output struct { // EgressLatencies is the list of egress latencies to global edge servers. EgressLatencies latency.Latencies `json:"egress_latencies"` }
func ParseOutputJSON ¶
func ParseStatesToOutput ¶
func ParseStatesToOutput(states ...components.State) (*Output, error)
Click to show internal directories.
Click to hide internal directories.