shakespeare/actors/key_value
An actor that provides a simple key-value store.
Types
An actor that serves as an in-memory key-value store.
pub opaque type KeyValueActor(a)
Functions
pub fn get(
actor: KeyValueActor(a),
key: String,
) -> Result(a, Nil)
Gets the value for the given key.
pub fn set(actor: KeyValueActor(a), key: String, value: a) -> Nil
Sets the value associated with the given key.
If value already exists for the given key it will be overwritten.