pub struct StorageSection {
pub backend: String,
pub url: Option<String>,
pub pool: Option<StoragePoolSection>,
}Expand description
[storage] section. Selects the audit-log backend.
Default (absent or backend = "sqlite") uses the local rusqlite-backed
store at [daemon].database. Production deployments should set
backend = "postgres" and supply a connection URL — the local SQLite
path is recommended only for testing and sandboxing because the audit
log dies with the host (no off-box durability, nothing to forward to
a SOC).
Example (Postgres, AWS RDS):
[storage]
backend = "postgres"
url = "postgres://sysknife:${PG_PASSWORD}@db.example.com:5432/audit?sslmode=verify-full"
[storage.pool]
max_connections = 8
acquire_timeout_secs = 10
statement_cache_capacity = 100 # set to 0 for transaction-mode poolersSee docs/storage-cloud.md for cloud-provider URL reference.
Fields§
§backend: String"sqlite" (default) or "postgres".
url: Option<String>Postgres connection URL (postgres://...). Required when
backend = "postgres". Ignored otherwise.
pool: Option<StoragePoolSection>Optional pool tuning. Defaults are sane for typical SysKnife load.
Implementations§
Source§impl StorageSection
impl StorageSection
Sourcepub fn parsed(&self) -> Result<StorageBackend, String>
pub fn parsed(&self) -> Result<StorageBackend, String>
Project the relaxed deserialised form into the type-state-checked
StorageBackend enum. Returns a human-readable error when the
(backend, url, pool) tuple is inconsistent (unknown backend,
postgres without url, etc.).