An in-memory [StorageProvider] implementation for [Arch Toolkit · Storage Core]. Useful for testing, prototyping, or ephemeral storage without persistence.
implementation("io.github.matheus-corregiari:storage-memory:<version>")
val memory = MemoryStoreProvider(mutableMapOf())
val flag = memory.boolean("feature_enabled")
val counter = memory.int("counter").required { 0 }
// Reactive
scope.launch {
flag.get().collect { println("Feature enabled? $it") }
}
// Update
flag.set(true)
counter.set(counter.instant() + 1)
println("Counter = ${counter.instant()}")
The Storage Memory module is part of the Arch Toolkit storage ecosystem:
This module is released under the Apache 2.0 License. See LICENSE for details.