Handles Redis server commands: PING, ECHO, DBSIZE, KEYS, FLUSHDB, FLUSHALL, INFO, COMMAND, SELECT, LOLWUT, and DEBUG.
Each handler takes the uppercased command name, a list of string arguments, and an injected store map. Returns plain Elixir terms — the connection layer handles RESP encoding.
Supported commands
PING [message]— returns{:simple, "PONG"}or echoes the messageECHO message— returns the message as a bulk stringDBSIZE— returns the number of keys in the storeKEYS pattern— returns keys matching a glob pattern (*,?)FLUSHDB [ASYNC|SYNC]— deletes all keysFLUSHALL [ASYNC|SYNC]— alias for FLUSHDB (single-db server)INFO [section]— returns server information as a bulk stringCOMMAND— returns array of command info tuplesCOMMAND COUNT— returns number of supported commandsCOMMAND DOCS name— returns simplified docs for a commandCOMMAND INFO name [name ...]— returns info for specific commandsCOMMAND LIST— returns all command namesCOMMAND GETKEYS command [args...]— returns which args are keysSELECT db— always returns error (not supported)LOLWUT [VERSION version]— returns ASCII art with FerricStore brandingDEBUG SLEEP seconds— sleeps for N seconds (testing only)
Summary
Functions
Handles a server command.