macro_rules! cable {
($pubsub:expr, [ $($channel:expr),* $(,)? ]) => { ... };
($pubsub:expr, [ $($channel:expr),* $(,)? ], heartbeat = $heartbeat:expr) => { ... };
}Expand description
Build an axum Router mounting the cable endpoint (/cable) for the given
channels over a pub/sub backend (Rails’ mount ActionCable.server):
ⓘ
let app = doido_cable::cable!(pubsub, [ChatChannel, NotificationsChannel]);
// With a configured heartbeat interval:
let app = doido_cable::cable!(pubsub, [ChatChannel], heartbeat = cfg.ping_interval);