InMemoryKeyValueStore

class InMemoryKeyValueStore(initial: Map<String, String> = emptyMap()) : KeyValueStore

In-memory store for tests and for hosts that opt out of persistence.

Constructors

Link copied to clipboard
constructor(initial: Map<String, String> = emptyMap())

Properties

Link copied to clipboard

A snapshot of the current contents.

Functions

Link copied to clipboard
open suspend override fun get(key: String): String?

Reads key, or null when absent.

Link copied to clipboard
open suspend override fun remove(key: String)

Removes key.

Link copied to clipboard
open suspend override fun set(key: String, value: String)

Writes value under key.