Routes Redis command names to the appropriate handler module.
The dispatcher normalises the command name to uppercase and delegates to one of:
Ferricstore.Commands.Strings— GET, SET, DEL, EXISTS, MGET, MSET, INCR, DECR, INCRBY, DECRBY, INCRBYFLOAT, APPEND, STRLEN, GETSET, GETDEL, GETEX, SETNX, SETEX, PSETEX, GETRANGE, SETRANGE, MSETNXFerricstore.Commands.Expiry— EXPIRE, PEXPIRE, EXPIREAT, PEXPIREAT, TTL, PTTL, PERSISTFerricstore.Commands.Generic— TYPE, UNLINK, RENAME, RENAMENX, COPY, RANDOMKEY, SCAN, EXPIRETIME, PEXPIRETIME, OBJECT, WAITFerricstore.Commands.Server— PING, ECHO, DBSIZE, KEYS, FLUSHDB, FLUSHALL, INFO, COMMAND, SELECT, LOLWUT, DEBUG
Multi-word commands (CLIENT, COMMAND) are routed based on the first word, then
the subcommand is extracted from args. CLIENT subcommands require connection
state and are dispatched via dispatch_client/3.
Unknown commands return {:error, "ERR unknown command ..."}.
Summary
Functions
Dispatches a command AST produced by the native AST parser.
Dispatches a raw command name and argument list through the canonical command AST dispatcher.
Parses a raw command name and argument list into the same AST used by the native command path.
Functions
Dispatches a command AST produced by the native AST parser.
Dispatches a raw command name and argument list through the canonical command AST dispatcher.
@spec parse_raw(binary(), [term()]) :: {:ok, binary(), [binary()], term(), [binary()]} | {:error, binary()}
Parses a raw command name and argument list into the same AST used by the native command path.
Native protocol uses this as a compatibility fallback for commands that do not yet have a specialized native opcode. Hot commands should keep using dedicated native opcodes.