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
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.