processconfig

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package processconfig is the process settings Core loads from its environment. Load reads every variable and every file it names exactly once, applies each default and validates the result; startup and `oac-core check-config` both call it. Errors name the variable and never include its value or the content of a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.10

type Config struct {
	// Addr is OAC_ADDR, the listener address.
	Addr string
	// PublicOrigin is OAC_PUBLIC_URL.
	PublicOrigin deployment.PublicOrigin
	// DatabaseURL is OAC_DATABASE_URL with the password from
	// OAC_DATABASE_PASSWORD_FILE.
	DatabaseURL string
	// InstallationID comes from OAC_INSTALLATION_ID_FILE.
	InstallationID string
	// CredentialKey seals stored credentials; it comes from
	// OAC_CREDENTIAL_KEY_FILE.
	CredentialKey *credentialcrypto.Cipher
	// CoreKeys authenticates the Core key from OAC_CORE_KEY_DIGESTS_FILE.
	CoreKeys             *api.DeploymentAuthenticator
	ExecutionConcurrency int
	DefaultHarness       string
	// Harnesses is the sorted set of enabled Harnesses, the default included.
	Harnesses           []string
	WriteAuditRetention time.Duration
	OAuthTrustedOrigins []string
	RuntimeHistory      RuntimeHistory
	// ProviderPaths locate adapter helpers under OAC_PROVIDER_ROOT and their
	// private state under the Compose state mount.
	ProviderPaths sandbox.ProcessPaths
	// NativeInstallers is the native installer catalog directory under
	// OAC_PROVIDER_ROOT; empty when the root is unset.
	NativeInstallers string
	Log              log.Config
}

Config is Core's process configuration.

func Load added in v0.0.10

func Load() (Config, error)

Load reads and validates the process environment. An unset or empty optional variable selects its default.

func (Config) Settings added in v0.0.10

func (c Config) Settings() []api.InstallationSetting

Settings projects the configuration that GET /core/v1/installation reports. Sensitive file settings report only whether they are configured.

type RuntimeHistory added in v0.0.10

type RuntimeHistory struct {
	// File is the path Core loaded, or empty.
	File string
	// Endpoint is an optional OTLP/HTTP metrics URL; Insecure allows http.
	Endpoint       string
	Insecure       bool
	Headers        map[string]string
	QueueCapacity  int
	Timeout        time.Duration
	SampleInterval time.Duration
}

RuntimeHistory is the file named by OAC_HISTORY_SETTINGS_FILE, with its defaults applied. Without the file, history stays in Core's database and nothing is exported.

Jump to

Keyboard shortcuts

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