Behaviour for Grizzly storage adapters.
Implementations should be compatible with PropertyTable.
Summary
Types
The argument passed to the storage adapter. See Grizzly.Options.
Callbacks
Delete keys matching a pattern.
Get a value from storage by key.
Match keys in storage against a pattern.
Put a key-value pair into storage.
Put multiple key-value pairs into storage.
Types
@type adapter_options() :: any()
The argument passed to the storage adapter. See Grizzly.Options.
Callbacks
@callback delete_matches(adapter_options(), Grizzly.Storage.pattern()) :: :ok
Delete keys matching a pattern.
@callback get(adapter_options(), Grizzly.Storage.key()) :: Grizzly.Storage.value()
Get a value from storage by key.
@callback match(adapter_options(), Grizzly.Storage.pattern()) :: [ {Grizzly.Storage.key(), Grizzly.Storage.value()} ]
Match keys in storage against a pattern.
@callback put(adapter_options(), Grizzly.Storage.key(), Grizzly.Storage.value()) :: :ok
Put a key-value pair into storage.
@callback put_many(adapter_options(), [{Grizzly.Storage.key(), Grizzly.Storage.value()}]) :: :ok
Put multiple key-value pairs into storage.