Documentation
¶
Overview ¶
latency_gen fetches Azure network round-trip latency statistics and Azure region data from Microsoft Learn and writes a single generated Go source file used by the region- selection plugin.
The generated file (zz_generated.latency.go) contains two package-level variables:
- azureRegionLatency: P50 RTT matrix (ms) between Azure regions
- regionCluster: mapping of each region's programmatic name to its geographic cluster
Sources:
- Latency matrix: https://learn.microsoft.com/en-us/azure/networking/azure-network-latency (full CSV block embedded at the bottom of the page)
- Region clusters: https://learn.microsoft.com/en-us/azure/reliability/regions-list (programmatic names extracted per-tab: americas / europe / asia-pacific / middle-east / africa)
Usage:
go run ./hack/code/latency_gen/main.go go run ./hack/code/latency_gen/main.go --output ./internal/scanners/plugins/region/zz_generated.latency.go
Click to show internal directories.
Click to hide internal directories.