Readonly~driverReadonly~optionsReadonly~schemaReadonlyconfigProxy to access configuration properties directly. Example: kfg.config.database.port
The driver backing the current configuration.
The user-defined schema definition.
Loads the configuration from the driver.
Optionaloptions: KfgLoadOptions<D>Transactional read-modify-write. Reads the latest persisted state, runs
fn to mutate it, validates, and persists — atomically across processes
when the driver supports it (preventing lost updates from concurrent
writers). Falls back to load→mutate→save when it does not.
fn may mutate the draft in place or return a replacement.
Optionaloptions: KfgLoadOptions<D>Drops the in-memory cache and marks the instance as not loaded, releasing
the memory it held. Persisted state is untouched: a lazy instance reloads
on the next access, and any other needs an explicit load().
StaticpoolCreates a pool of instances keyed by scope id, exposing this same API. See KfgPool.
The public surface shared by
KfgandKfgPool.Both implement this interface with the exact same generics, so a pool can be dropped in wherever a single instance was used before without touching call sites — dot-path autocompletion and return types stay identical.