BaileysEx.Auth.KeyStore (baileys_ex v0.1.0-alpha.12)

Copy Markdown View Source

Persistence-backed transactional Signal key store.

The runtime owns a key-store server and a task supervisor. Persistence work runs serially under the task supervisor so slow storage never blocks lock ownership and queue management in the server.

Summary

Functions

Returns a specification to start this module under a supervisor.

Clears all persisted Signal keys.

Fetches identifiers for a Signal data type.

Returns whether the supplied reference is transaction-scoped.

Persists a typed Signal data set.

Starts the transactional key-store supervision subtree.

Runs work under an exclusive transaction key.

Creates a read-only query reference for a running key store.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear(ref)

Clears all persisted Signal keys.

get(ref, type, ids)

Fetches identifiers for a Signal data type.

in_transaction?(ref)

Returns whether the supplied reference is transaction-scoped.

set(ref, data)

Persists a typed Signal data set.

start_link(opts \\ [])

@spec start_link(keyword()) :: Supervisor.on_start()

Starts the transactional key-store supervision subtree.

transaction(ref, key, fun)

Runs work under an exclusive transaction key.

wrap(runtime)

Creates a read-only query reference for a running key store.