Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a WebSocket client connection
func (*Client) ReadPump ¶
ReadPump reads messages from the WebSocket connection (mainly to detect disconnects)
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to them
func (*Hub) ClientCount ¶
ClientCount returns the number of connected clients
func (*Hub) Unregister ¶
Unregister removes a client from the hub
type KeyEventData ¶
type KeyEventData struct {
Op string `json:"op"` // "set", "del", "expire", "expired", "rename_from", "rename_to"
Key string `json:"key"`
}
KeyEventData represents a key operation event
type Message ¶
type Message struct {
Type string `json:"type"` // "key_event", "stats", "status"
Data interface{} `json:"data"`
}
Message is the wrapper for all WebSocket messages
type StatsData ¶
type StatsData struct {
DBSize int64 `json:"dbSize"`
UsedMemory int64 `json:"usedMemory"` // bytes
UsedMemoryHuman string `json:"usedMemoryHuman"` // formatted (e.g., "1.18M")
NotificationsOn bool `json:"notificationsOn"`
}
StatsData represents periodic stats updates
type StatusData ¶
type StatusData struct {
Live bool `json:"live"` // true if keyspace notifications are enabled
Msg string `json:"msg,omitempty"` // optional message
}
StatusData represents connection status information
Click to show internal directories.
Click to hide internal directories.