Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Path is the WebSocket upgrade route (GET). Default /reverb/ws
Path string
// RedisURL enables cross-instance fan-out (same as REDIS_URL if empty).
RedisURL string
// AllowedOrigins restricts WS Origin header; empty allows same-host only.
AllowedOrigins []string
// FanoutChannel overrides the Redis Pub/Sub channel name.
FanoutChannel string
// Gate authorizes the upgrade request. Nil = allow (use middleware on the route group for auth).
Gate func(*http.Context) bool
}
Config configures the Reverb plugin.
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub tracks WebSocket subscribers per logical channel.
func GetHub ¶
func GetHub() *Hub
GetHub returns the active hub (for advanced use). May be nil if the plugin is not registered.
type Plugin ¶
type Plugin struct {
nimbus.BasePlugin
// contains filtered or unexported fields
}
Plugin provides WebSocket broadcasting.
func (*Plugin) RegisterRoutes ¶
RegisterRoutes mounts the WebSocket endpoint.
Click to show internal directories.
Click to hide internal directories.