Supabase.Realtime.Channel.Store
(supabase_realtime v0.5.0)
Copy Markdown
ETS-based storage for Realtime channels.
This module provides a centralized store for channel data that can be accessed by both the Connection and Registry modules, eliminating the need for manual state management in each component.
Summary
Functions
Adds a binding to a channel.
Adds a pending acknowledgment to a channel.
Returns all channels in the store.
Returns a specification to start this module under a supervisor.
Finds all channels with a matching topic.
Finds a channel by its join reference.
Finds a channel by its reference.
Finds a channel by its topic.
Handles when an acknowledgment is received from the server.
Handles when an acknowledgment times out.
Inserts a new channel into the store.
Removes a channel from the store.
Removes a binding from a channel.
Starts the channel store.
Updates an existing channel in the store.
Updates the join reference of a channel.
Updates the state of a channel.
Functions
Adds a binding to a channel.
Parameters
store- The store processchannel- The channel to updatetype- The binding typefilter- The binding filtercallback- Optional callback function
Adds a pending acknowledgment to a channel.
Parameters
store- The store processchannel- The channel to updateack_ref- The acknowledgment referencecaller- The process that will receive the acknowledgment
Returns all channels in the store.
Parameters
store- The store process
Returns a specification to start this module under a supervisor.
See Supervisor.
Finds all channels with a matching topic.
Parameters
store- The store processtopic- The topic to match
Finds a channel by its join reference.
Parameters
store- The store processjoin_ref- The join reference
Finds a channel by its reference.
Parameters
store- The store processref- The channel reference
Finds a channel by its topic.
Parameters
store- The store processtopic- The channel topic
Handles when an acknowledgment is received from the server.
Parameters
store- The store processack_ref- The acknowledgment reference
Handles when an acknowledgment times out.
Parameters
store- The store processack_ref- The acknowledgment reference
Inserts a new channel into the store.
Parameters
store- The store processchannel- The channel to insert
Removes a channel from the store.
Parameters
store- The store processchannel- The channel to remove
Removes a binding from a channel.
Parameters
store- The store processchannel- The channel to updatetype- The binding typefilter- The binding filter
Starts the channel store.
Options
:name- Optional registration name
Updates an existing channel in the store.
Parameters
store- The store processchannel- The updated channel data
Updates the join reference of a channel.
Parameters
store- The store processchannel- The channel to updatejoin_ref- The new join reference
Updates the state of a channel.
Parameters
store- The store processchannel- The channel to updatestate- The new channel state