config

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IngestURL             string `json:"ingest_url"`
	UploadToken           string `json:"upload_token"`
	ITContactEmail        string `json:"it_contact_email"`
	PerTestTimeoutSeconds int    `json:"per_test_timeout_seconds"`
	UploadTimeoutSeconds  int    `json:"upload_timeout_seconds"`
	UploadRetries         int    `json:"upload_retries"`
	OmitWifiSSID          bool   `json:"omit_wifi_ssid"`
	UDPProbeMagic         string `json:"udp_probe_magic"`
	POPs                  []POP  `json:"pops"`
}

func Load

func Load(sidecarPath string) (*Config, error)

Load merges baked-in defaults with build-time ldflags overrides and an optional sidecar JSON file at sidecarPath. Empty sidecarPath means defaults + ldflags overrides only.

Precedence (lowest → highest):

  1. Embedded defaults.json (non-secret tunables)
  2. defaults.FallbackPOPsJSON (build-time injected fallback POP list)
  3. defaults.{UploadToken, IngestURL, ITContactEmail} (build-time injected)
  4. Sidecar JSON file at sidecarPath, if present

type POP

type POP struct {
	ID          string `json:"id"`
	RegionLabel string `json:"region_label"`
	Hostname    string `json:"hostname"`
	UDPEcho     bool   `json:"udp_echo"`
}

Directories

Path Synopsis
Package defaults holds build-time-injected configuration values.
Package defaults holds build-time-injected configuration values.
Package identity persists the user's name and email across runs so the identify screen can pre-fill the form.
Package identity persists the user's name and email across runs so the identify screen can pre-fill the form.
Package popsfetch retrieves the live POP list from the ingest service.
Package popsfetch retrieves the live POP list from the ingest service.

Jump to

Keyboard shortcuts

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