LemonChannels. PresentationState
(lemon_channels v0.1.0)
View Source
Tracks channel presentation state per {route, run, surface}.
State is owned by :lemon_channels so router processes can stay semantic and
avoid platform-specific message-id bookkeeping.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type entry() :: %{ route: LemonCore.DeliveryRoute.t(), run_id: binary(), surface: surface(), platform_message_id: integer() | binary() | nil, pending_create_ref: reference() | nil, pending_create_at: integer() | nil, pending_edit_ref: reference() | nil, pending_edit_at: integer() | nil, last_seq: non_neg_integer(), last_text_hash: integer() | nil, deferred_text: binary() | nil, deferred_chunks: [binary()] | nil, pending_followup_chunks: [binary()] | nil, deferred_seq: non_neg_integer() | nil, deferred_hash: integer() | nil, deferred_meta: map(), pending_followup_meta: map(), pending_resume: term() | nil }
@type surface() :: term()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear(LemonCore.DeliveryRoute.t(), binary(), surface()) :: :ok
@spec defer_chunks( LemonCore.DeliveryRoute.t(), binary(), surface(), [binary()], non_neg_integer(), integer() | nil, map() ) :: :ok
@spec defer_text( LemonCore.DeliveryRoute.t(), binary(), surface(), binary(), non_neg_integer(), integer() | nil, map() ) :: :ok
@spec get(LemonCore.DeliveryRoute.t(), binary(), surface()) :: entry()
@spec mark_sent( LemonCore.DeliveryRoute.t(), binary(), surface(), non_neg_integer(), integer() | nil, integer() | binary() | nil ) :: :ok
@spec move(LemonCore.DeliveryRoute.t(), binary(), surface(), surface()) :: :ok
@spec notify_tag() :: atom()
@spec register_pending_create( LemonCore.DeliveryRoute.t(), binary(), surface(), reference(), non_neg_integer(), integer() | nil, term() | nil ) :: :ok
@spec register_pending_edit( LemonCore.DeliveryRoute.t(), binary(), surface(), reference(), non_neg_integer(), integer() | nil, integer() | binary() | nil ) :: :ok
@spec reserve_pending_create( LemonCore.DeliveryRoute.t(), binary(), surface(), non_neg_integer(), integer() | nil, term() | nil ) :: {:reserved, reference()} | {:duplicate, entry()} | {:existing, entry()}
@spec stage_followups( LemonCore.DeliveryRoute.t(), binary(), surface(), [binary()], map() ) :: :ok