Sky.Config
Sky.Config — the app's cross-cutting configuration value.
Types
type Config = Config_OPAQUE
type LogFormat = Json | Text
type LogLevel = Debug | Info | Warn | Error
type Database = Sqlite String | Postgres String
type Sessions = Memory | SessionsSqlite String | SharedWithDatabase | Redis String
type JobStore = JobsMemory | JobsSqlite String | JobsSharedWithDatabase
type Telemetry = Otlp String
type Capacity = Bytes Int | Megabytes Int | Gigabytes Int
Values
default : Config
The empty config — every setting takes its runtime default. An app that
withCsrf : Bool -> Config -> Config
Enable or disable the global CSRF middleware (`<PREFIX>_CSRF`). Default is
withDatabase : Database -> Config -> Config
Set the database the app connects to (`<PREFIX>_DB_PATH` for SQLite,
withJobs : JobStore -> Config -> Config
Set the Std.Jobs store (`<PREFIX>_JOBS_STORE` /
withLog : LogFormat -> LogLevel -> Config -> Config
Set the structured-log format and minimum level.
withSessions : Sessions -> Config -> Config
Set the Sky.Live session store (`<PREFIX>_LIVE_STORE` /
withTelemetry : Telemetry -> Config -> Config
Point the OTLP telemetry exporter at a collector
withTelemetryAggregationWindow : Int -> Config -> Config
Counter-coalescing window in SECONDS (`SKY_TELEMETRY_AGGREGATION_WINDOW`);
withTelemetryDbCapacity : Capacity -> Config -> Config
Declared database capacity (`SKY_TELEMETRY_DB_CAPACITY`) for the size-report
withTelemetryHistogramWindow : Int -> Config -> Config
Histogram-coalescing window in SECONDS
withTelemetrySynchronousCommit : Bool -> Config -> Config
Whether the telemetry writer waits for the Postgres WAL fsync on its batches