module Cable
Overview
TODO Write documentation for Cable
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
Defined in:
backend/dev/backend.crbackend/redis/backend.cr
cable.cr
cable/backend_core.cr
cable/channel.cr
cable/connection.cr
cable/debug.cr
cable/handler.cr
cable/logger.cr
cable/payload.cr
cable/redis_pinger.cr
cable/remote_connections.cr
cable/server.cr
cable/websocket_pinger.cr
Constant Summary
-
HABITAT_SETTINGS =
[{decl: route : String = Cable.message(:default_mount_path), example: "/cable", validation: nil}, {decl: token : String = "token", example: "token", validation: nil}, {decl: url : String = ENV.fetch("REDIS_URL", "redis://localhost:6379"), example: "redis://localhost:6379", validation: nil}, {decl: disable_sec_websocket_protocol_header : Bool = false, example: nil, validation: nil}, {decl: backend_class : Cable::BackendCore.class = Cable::RedisBackend, example: "Cable::RedisBackend", validation: nil}, {decl: redis_ping_interval : Time::Span = 15.seconds, example: nil, validation: nil}, {decl: restart_error_allowance : Int32 = 20, example: nil, validation: nil}, {decl: on_error : Proc(Exception, String, Nil) = ->(exception : Exception, message : String) do Cable::Logger.error(exception: exception) do message end end, example: nil, validation: nil}, {decl: pool_redis_publish : Bool = false, example: nil, validation: nil}, {decl: redis_pool_size : Int32 = 5, example: nil, validation: nil}, {decl: redis_pool_timeout : Float64 = 5.0, example: nil, validation: nil}] of Nil
-
INTERNAL =
{message_types: {welcome: "welcome", disconnect: "disconnect", ping: "ping", confirmation: "confirm_subscription", rejection: "reject_subscription", unsubscribe: "confirm_unsubscription"}, channel: "_internal", disconnect_reasons: {unauthorized: "unauthorized", invalid_request: "invalid_request", server_restart: "server_restart", remote: "remote"}, default_mount_path: "/cable", protocols: ["actioncable-v1-json", "actioncable-unsupported"]}
-
Logger =
Log.for(self)
-
VERSION =
"0.3.1"