Application-owned event source boundary for subscriptions/listen.
Sources open a lightweight handle, pull one event at a time, and close that
handle when the request is cancelled, disconnected, completed, or fails.
next/2 may block; the framework always invokes it in a dedicated worker and
never requests another event until the previous event has been written.
open/3 must acknowledge only a subset of its requested filter. close/3
should return promptly and release any application resources associated with
a blocked pull.
Summary
Types
Callbacks
@callback close(handle :: term(), close_reason(), options :: term()) :: :ok | term()
@callback next(handle :: term(), options :: term()) :: {:ok, Snodo.Subscription.Event.t()} | :closed | {:error, term()}
@callback open(requested_filter :: map(), Snodo.Context.t(), options :: term()) :: {:ok, accepted_filter :: map(), handle :: term()} | {:error, Snodo.Error.t() | term()}