config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 4 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 {
	// Addr is the HTTP listen address for the ConnectRPC server.
	Addr string
	// DatabaseURL points at the same Postgres database used by the TypeScript API.
	DatabaseURL string
	// SessionIdleMinutes mirrors APERIO_SESSION_IDLE_MINUTES from the TypeScript API.
	SessionIdleMinutes int
	// WebOrigin is the comma-separated browser origin allow-list used for credentialed RPCs.
	WebOrigin string
	// MetricsToken is the dedicated bearer credential for the aggregate Prometheus endpoint.
	MetricsToken           string
	CerebroWebURL          string
	MaxOpenConns           int
	MaxIdleConns           int
	ConnMaxLifetimeMinutes int
	ConnMaxIdleMinutes     int
}

Config contains the small runtime surface the Go service needs today. It is intentionally independent from the TypeScript API config so the new backend can be deployed, scaled, and rolled back as its own process.

func FromEnv

func FromEnv() Config

FromEnv reads process configuration with local-development defaults. Required values, such as DATABASE_URL, are validated by cmd/aperio so tests can build a Config without a database.

Jump to

Keyboard shortcuts

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