static

package
v0.14.52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package static contains static information for the locate service.

Index

Constants

View Source
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

View Source
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.

View Source
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

View Source
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.

View Source
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.

ServiceParams is a map of common parameters passed in by services (as URL params) with corresponding probabilities set by the Locate.

Functions

func URL

func URL(scheme, port, path string) url.URL

URL creates inline url.URLs.

Types

type Ports

type Ports []url.URL

Ports maps names to URLs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL