Documentation ¶
Overview ¶
Package static contains static information for the locate service.
Index ¶
Constants ¶
const ( IssuerLocate = "locate" AudienceLocate = "locate" IssuerMonitoring = "monitoring" SubjectMonitoring = "monitoring" WebsocketBufferSize = 1 << 10 // 1024 bytes. WebsocketReadDeadline = 30 * time.Second BackoffInitialInterval = time.Second BackoffRandomizationFactor = 0.5 BackoffMultiplier = 2 BackoffMaxInterval = 5 * time.Minute BackoffMaxElapsedTime = 0 HeartbeatPeriod = 10 * time.Second MemorystoreExportPeriod = 10 * time.Second PrometheusCheckPeriod = time.Minute RedisKeyExpirySecs = 30 EarthHalfCircumferenceKm = 20038 )
Constants used by the locate service, clients, and target servers accepting access tokens issued by the locate service.
Variables ¶
var Configs = map[string]Ports{ "ndt/ndt7": { URL("ws", "", "/ndt/v7/upload"), URL("ws", "", "/ndt/v7/download"), URL("wss", "", "/ndt/v7/upload"), URL("wss", "", "/ndt/v7/download"), }, "ndt/ndt5": { URL("ws", ":3001", "/ndt_protocol"), URL("wss", ":3010", "/ndt_protocol"), }, "neubot/dash": { URL("https", "", "/negotiate/dash"), }, "wehe/replay": { URL("wss", ":4443", "/v0/envelope/access"), }, "iperf3/test": { URL("wss", "", "/v0/envelope/access"), }, }
Configs is a temporary, static mapping of service names and their set of associated ports. Ultimately, this will be discovered dynamically as service heartbeats register with the locate service.
var Countries = map[string]string{}/* 244 elements not displayed */
Countries contains a static mapping of two-letter country codes to their geographic center. Source: https://developers.google.com/public-data/docs/canonical/countries_csv
var LegacyServices = map[string]string{
"neubot/dash": "neubot",
"wehe/replay": "wehe",
"iperf3/test": "ndt7",
"ndt/ndt5": "ndt_ssl",
"ndt/ndt7": "ndt7",
}
LegacyServices associates legacy mlab-ns experiment target names with their v2 equivalent.
var Regions = map[string]string{}/* 4416 elements not displayed */
Regions contains a static mapping of ISO 3166-2 region codes. Each key is additionally prefixed with the two-letter country code because not all region codes are unique.
var SiteProbability = map[string]float64{
"ams10": 0.3,
"bom01": 0.1,
"bom02": 0.1,
"bru06": 0.3,
"cgk01": 0.3,
"chs01": 1.0,
"cmh01": 1.0,
"del03": 0.3,
"dfw09": 0.3,
"fra07": 1.0,
"gru01": 0.1,
"gru02": 0.1,
"gru03": 0.1,
"gru04": 0.1,
"hel01": 0.3,
"hkg04": 0.3,
"hnd03": 0.1,
"hnd04": 0.1,
"iad07": 1.0,
"icn01": 0.3,
"kix01": 0.3,
"las01": 0.3,
"lax07": 0.3,
"lga1t": 0.5,
"lhr09": 0.3,
"lis01": 0.5,
"lju01": 0.5,
"mad07": 0.3,
"mel01": 0.3,
"mil08": 0.3,
"oma01": 0.3,
"ord07": 0.3,
"prg02": 0.3,
"prg03": 0.3,
"prg04": 0.3,
"prg05": 0.3,
"prg06": 0.3,
"par08": 0.3,
"pdx01": 0.3,
"scl05": 0.3,
"sea09": 0.3,
"sin02": 0.3,
"slc01": 0.3,
"syd07": 0.3,
"tpe02": 0.3,
"tun01": 0.5,
"vie01": 0.5,
"waw01": 1.0,
"yul07": 1.0,
"yyz07": 1.0,
"zrh01": 0.3,
}
SiteProbability defines explicit probabilites for sites that cannot handle the current number of requests. The default value is 1.0. TODO(github.com/m-lab/locate/issues/92): Make this dynamic.