How many operations have fallen back to defaultScope.
Read-only proxy over the loaded configuration.
The driver backing the current configuration.
The user-defined schema definition.
Number of instances currently held by the pool.
Drops every instance, emptying the pool.
The scope that would be used right now, or null if there is none.
Drops the instance for id from the pool, releasing its cache. Persisted
state is untouched; the next access builds a fresh instance.
Returns (creating it if needed) the instance for id.
The id is passed verbatim to options.driver, which typically interpolates
it into a file path. Ids that reach the pool from outside the process must
be validated by the host first: the pool does no sanitizing, so a value
containing path separators or .. would escape the intended directory.
Ids of the instances currently held by the pool.
Marks the instance for id as stale so the next access rereads it from
disk, keeping the instance's identity — unlike dispose, references
previously handed out by for(id) also see the fresh state. Call it after
writing a scope's file behind the pool's back.
Invalidates every instance the pool holds.
Optionaloptions: KfgLoadOptions<D>Optionaloptions: KfgLoadOptions<D>Alias of current.
Drops the in-memory cache; persisted state is untouched.
A set of
Kfginstances keyed by scope id, exposing the exact same API as a single instance.Every read/write is routed to the instance for the currently active scope, resolved in this order: an enclosing
run(), thenoptions.resolve(), thenoptions.defaultScope.for(id)addresses an instance explicitly and is a first-class entry point — background jobs and dashboards have no ambient scope to rely on.Pools are synchronous-only: a scope is materialized on demand, and a sync driver is what makes that transparent to callers.