class Cable::RedisBackend

Defined in:

backend/redis/backend.cr

Instance Method Summary

Instance methods inherited from class Cable::BackendCore

close_publish_connection close_publish_connection, close_subscribe_connection close_subscribe_connection, open_subscribe_connection(channel) open_subscribe_connection, ping_redis_publish ping_redis_publish, ping_redis_subscribe ping_redis_subscribe, publish_connection publish_connection, publish_message(stream_identifier : String, message : String) publish_message, subscribe(stream_identifier : String) subscribe, subscribe_connection subscribe_connection, unsubscribe(stream_identifier : String) unsubscribe

Instance Method Detail

def close_publish_connection #

[View source]
def close_subscribe_connection #

[View source]
def open_subscribe_connection(channel) #

internal pub/sub


[View source]
def ping_redis_publish #

[View source]
def ping_redis_subscribe #

since @server.redis_subscribe connection is called on a block loop we basically cannot call ping outside of the block instead, we just spin up another new redis connection then publish a special channel/message broadcast the @server.redis_subscribe picks up this special combination and calls ping on the block loop for us


[View source]
def publish_connection : Redis::Client #

[View source]
def publish_message(stream_identifier : String, message : String) #

external pub/sub


[View source]
def redis_publish : Redis::Client #

[View source]
def redis_subscribe : Redis::Connection #

connection management


[View source]
def subscribe(stream_identifier : String) #

channel management


[View source]
def subscribe_connection : Redis::Connection #

connection management


[View source]
def unsubscribe(stream_identifier : String) #

[View source]