Documentation
¶
Overview ¶
Package ws serves commands over WebSocket (mounted at /v1/ws).
Client → server text messages:
{"id": <any>, "cmd": ["GET", "a"]} a command (a bare ["GET","a"] also works)
{"id": <any>, "auth": ["user", "pass"]} or {"auth": "pass"}
Server → client:
{"id": ..., "result": <json>} / {"id": ..., "error": "..."}
{"push": <json>} pub/sub messages, KEYWATCH events, invalidations, MONITOR
Authentication: ?token=<password or user:pass>, the Authorization header (Bearer / Basic), or an {"auth": ...} message. The connection speaks RESP3 semantics, so commands keep working while subscribed.
Index ¶
Constants ¶
const NamespaceHeader = "X-CacheBoy-Namespace"
NamespaceHeader / ?namespace= select the connection's initial namespace.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.