server

package
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Overview

Package server implements the entry point for running a robot web server.

Package server implements the entry point for running a robot web server.

Index

Constants

This section is empty.

Variables

View Source
var ForceRestart bool

ForceRestart lets random other parts of the app request an exit.

Functions

func RunServer

func RunServer(ctx context.Context, args []string, _ logging.Logger) (err error)

RunServer is an entry point to starting the web server that can be called by main in a code sample or otherwise be used to initialize the server.

Types

type Arguments

type Arguments struct {
	AllowInsecureCreds         bool   `flag:"allow-insecure-creds,usage=allow connections to send credentials over plaintext"`
	ConfigFile                 string `flag:"config,usage=robot config file"`
	CPUProfile                 string `flag:"cpuprofile,usage=write cpu profile to file"`
	Debug                      bool   `flag:"debug"`
	SharedDir                  string `flag:"shareddir,usage=web resource directory"`
	Version                    bool   `flag:"version,usage=print version"`
	WebProfile                 bool   `flag:"webprofile,usage=include profiler in http server"`
	WebRTC                     bool   `flag:"webrtc,default=true,usage=force webrtc connections instead of direct"`
	RevealSensitiveConfigDiffs bool   `flag:"reveal-sensitive-config-diffs,usage=show config diffs"`
	UntrustedEnv               bool   `flag:"untrusted-env,usage=disable processes and shell from running in a untrusted environment"`
	OutputTelemetry            bool   `flag:"output-telemetry,usage=print out telemetry data (metrics and spans)"`
	DisableMulticastDNS        bool   `flag:"disable-mdns,usage=disable server discovery through multicast DNS"`
	DumpResourcesPath          string `flag:"dump-resources,usage=dump all resource registrations as json to the provided file path"`
	EnableFTDC                 bool   `flag:"ftdc,default=true,usage=enable fulltime data capture for diagnostics"`
	OutputLogFile              string `flag:"log-file,usage=write logs to a file with log rotation"`
	NoTLS                      bool   `flag:"no-tls,usage=starts an insecure http server without TLS certificates even if one exists"`
	NetworkCheckOnly           bool   `flag:"network-check,usage=only runs normal network checks, logs results, and exits"`
}

Arguments for the command.

type STUNResponse added in v0.73.0

type STUNResponse struct {
	// STUNServerURL is the URL of the STUN server.
	STUNServerURL string

	// STUNServerAddr is the resolved address of the STUN server.
	STUNServerAddr *string

	// BindResponseAddr is our address as reported by the STUN server.
	BindResponseAddr *string

	// Time taken to send bind request, receive bind response, and extract address. A vague
	// measurement of RTT to the STUN server.
	TimeToBindResponseMS *int64

	// Any error received during STUN interactions.
	ErrorString *string
}

STUNResponse represents a response from a STUN server.

Jump to

Keyboard shortcuts

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