AdapterCtx

tagtree · /core·interface

Runtime context passed to every adapter operation, carrying the schema definition and a logger so adapters can emit structured diagnostics tied to the call site.

Properties

logger
Logger instance for emitting diagnostics from within adapter operations.
schema
S
The resolved cache schema shape; adapters may inspect ``schema.namespace`` for scoped logging.
requestScope?
unknown
Opaque per-request value that adapter implementations may use to correlate operations across a single request lifecycle.

Example

const ctx: AdapterCtx = {
    schema: myCache.schema,
    logger: consoleLogger,
};
await myAdapter.read('some-key', ctx);

ContractTestOptions runAdapterContract CacheAdapter CacheInstance CacheKey CacheSchema CacheSchemaShape EntityDecl

Sourceadapter.ts:38Edit the JSDoc directly

On this page