runtime

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package runtime starts and stops the reference server's HTTP listeners and background workers.

Serve validates listener security, builds the configured application and runs it until cancellation or a serving failure. It supports configured certificate files and managed HTTPS identities. Plain HTTP is restricted to loopback; the DDM role additionally requires an explicit test option.

Shutdown stops HTTP admission and drains active requests before cancelling workers. A shared deadline bounds that drain, and workers that fail to stop are reported as an error. Serve closes the application resources it owns.

Index

Constants

This section is empty.

Variables

View Source
var ErrProbe = errors.New("health probe failed")

ErrProbe identifies invalid probe configuration or an unhealthy endpoint.

Functions

func Probe

func Probe(ctx context.Context, cfg ProbeConfig) error

Probe checks storage health with a two-second deadline, without redirects. Automatic probes do not use HTTP proxies. Certificate changes require the serving process to restart before its local certificate pin matches again.

func Serve

func Serve(ctx context.Context, cfg app.Config) error

Types

type ProbeConfig

type ProbeConfig struct {
	Certificate *x509.Certificate
	URL         string
	Listen      string
	TLSCertFile string
	TLSKeyFile  string
	CAFile      string
}

ProbeConfig selects an explicit URL or the process configuration with URL=auto. Automatic TLS checks trust and pin the configured certificate, independently of public DNS or the device-identity CA. CAFile is for explicit URL probes.

Jump to

Keyboard shortcuts

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