Interfacetypesv0.16.0
KvDriver
The backend behind config.kv. seedcord turns every value into JSON before it calls the driver, so
a driver only stores and returns strings. Each method may return its result directly or as a
promise.
config.kv also requires Disposable or AsyncDisposable on the driver. A node bot calls it
after the last shutdown phase to close the backend.
interface KvDriverdelete(key: string): Promisable<void>entries(
prefix: string
): AsyncIterable<KvEntry> | Iterable<KvEntry>get(
key: string
): Promisable<string | undefined>set(
key: string,
value: string,
ttlMs?: number
): Promisable<void>Parameter:
ttlMsThe backend may delete the key after this many milliseconds. Seedcord checks the expiry on read either way.