Supabase.Realtime.Behaviour behaviour
(supabase_realtime v0.5.0)
Copy Markdown
Defines the interface for the main module Supabase.Realtime
Summary
Types
@type channel() :: Supabase.Realtime.Channel.t()
@type channel_opts() :: keyword()
@type event_filter() :: Enumerable.t()
@type event_type() :: :postgres_changes | :broadcast | :presence
@type start_option() :: {:name, atom()} | {:timeout, pos_integer()}
Callbacks
@callback channel(t(), String.t(), channel_opts()) :: {:ok, channel()} | {:error, term()}
@callback connection_state(t()) :: Supabase.Realtime.connection_state()
@callback on(channel(), String.t(), event_filter()) :: :ok | {:error, term()}
@callback start_link(Supabase.Client.t(), [start_option()]) :: Supervisor.on_start()