Module: DurableStreams::Rails::StreamName

Included in:
DurableStreams
Defined in:
lib/durable_streams/rails/stream_name.rb

Overview

Stream names identify which updates go to which subscribers. They are derived from Active Record models (via to_gid_param) or plain strings (via to_param), joined with / for compound stream identifiers.

DurableStreams.stream_name_from([:rooms, room, :messages])
# => "rooms/gid://app/Room/1/messages"

Constant Summary collapse

PERMISSIONS =
%w[ read write ].freeze