Broken

class Broken(undo: suspend () -> DurableStore) : MediumFault

The medium under the store is broken until heal is called: every read, write and delete through the store must fail.

heal undoes the fault and returns a store over the same medium, holding everything that was written before the fault. That is the store passed in when the fault was outside it (a permission, a mount), and a new handle when the fault used the old one up — a closed IndexedDB connection cannot be reopened in place. The suite calls it exactly once, in a finally, so a fixture that changes the host (a chmod) always puts it back.

Constructors

Link copied to clipboard
constructor(undo: suspend () -> DurableStore)

Functions

Link copied to clipboard
suspend fun heal(): DurableStore

Undo the fault, and return a store over the healed medium. The suite calls it exactly once.