class CelluloidPubsub::Registry

class used to register new channels and save them in memory @attr channels

@return [Array] array of channels to which actors have subscribed to

Attributes

channels[W]

The channels that the server can handle @return [Array] array of channels to which actors have subscribed to

messages[W]

Messages that are published before any clients being subscribed to those channels will be kept here until a client subscribes to that channel @return [Hash] key-value pairs containing the channel and the messages that were published

Public Class Methods

channels() click to toggle source
holds a list of all known channels

@return [Array<String>]

@api private

# File lib/celluloid_pubsub/registry.rb, line 36
def channels
  @channels ||= []
end
messages() click to toggle source

holds a list of all messages sent by clients that were not published to a channel because there were no subscribers at that time

The keys are the channel names and the values are arrays of messages

@return [Hash<String, Array<Hash>>]

@api private

# File lib/celluloid_pubsub/registry.rb, line 27
def messages
  @messages ||= {}
end