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 HealthEndpointTimeout = 5 * time.Second HeartbeatPeriod = 10 * time.Second MemorystoreExportPeriod = 10 * time.Second PrometheusCheckPeriod = time.Minute RedisKeyExpirySecs = 30 RegistrationLoadMin = 3 * time.Hour RegistrationLoadExpected = 12 * time.Hour RegistrationLoadMax = 24 * time.Hour EarthHalfCircumferenceKm = 20038 EarlyExitParameter = "early_exit" MaxCwndGainParameter = "max_cwnd_gain" MaxElapsedTimeParameter = "max_elapsed_time" )
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 ServiceParams = map[string]float64{ EarlyExitParameter: 0.9, MaxCwndGainParameter: 1, MaxElapsedTimeParameter: 1, }
ServiceParams is a map of common parameters passed in by services (as URL params) with corresponding probabilities set by the Locate.