waveserver

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const BackupCleanupInterval = 4 * time.Hour
View Source
const BackupCleanupTick = 2 * time.Minute
View Source
const InitialTelemetryWait = 10 * time.Second
View Source
const TelemetryCountsInterval = 1 * time.Hour
View Source
const TelemetryInitialCountsWait = 5 * time.Second
View Source
const TelemetryInterval = 4 * time.Hour
View Source
const TelemetryTick = 2 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type Addrs

type Addrs struct {
	Web string
	Ws  string
}

Addrs are the listeners a client needs to reach the server.

func Start

func Start(opts Options) (Addrs, error)

Start brings up the whole backend and returns the addresses it listens on.

The web server runs in the background rather than blocking, so a caller can be something other than a `main` with nothing else to do — an in-process host, or a test. Shutdown still goes through the signal handlers installed here, and those end the process, so a caller that only wants the server running can simply block.

type Options

type Options struct {
	// Version and BuildTime are the caller's build stamps. They end up in
	// wavebase and in telemetry, and the startup handshake reports them.
	Version   string
	BuildTime string
	// WatchStdin shuts the server down when stdin closes. That is the contract
	// with a supervising parent process that spawns this as a child; it is wrong
	// for a host that runs the server in-process, where stdin belongs to the host.
	WatchStdin bool
}

Options is what the process knows and this package cannot work out for itself.

Jump to

Keyboard shortcuts

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