Parrhesia.Subscriptions.Index
(parrhesia v0.12.0)
Copy Markdown
ETS-backed subscription index used for fanout candidate narrowing.
Subscriptions are keyed by {owner_pid, subscription_id} and indexed by kind,
author pubkey, and single-letter tag values.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type filter() :: map()
@type owner() :: pid()
@type subscription_id() :: String.t()
@type subscription_key() :: {owner(), subscription_id()}
Functions
@spec candidate_subscription_keys(map()) :: [subscription_key()]
@spec candidate_subscription_keys(GenServer.server(), map()) :: [subscription_key()]
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec fetch_filters(GenServer.server(), owner(), subscription_id()) :: {:ok, [filter()]} | :error
@spec remove(owner(), subscription_id()) :: :ok
@spec remove(GenServer.server(), owner(), subscription_id()) :: :ok
@spec remove_owner(owner()) :: :ok
@spec remove_owner(GenServer.server(), owner()) :: :ok
@spec start_link(keyword()) :: GenServer.on_start()
@spec upsert(owner(), subscription_id(), [filter()]) :: :ok | {:error, term()}
@spec upsert(GenServer.server(), owner(), subscription_id(), [filter()]) :: :ok | {:error, term()}