FauxRedis.Command (faux_redis v1.0.3)

Copy Markdown View Source

Representation of a single Redis command invocation.

This struct is used internally by the dispatcher and mocking engine.

Summary

Types

Uppercase command name.

t()

A parsed Redis command.

Functions

Builds a command struct from an array value decoded from RESP.

Types

name()

@type name() :: String.t()

Uppercase command name.

t()

@type t() :: %FauxRedis.Command{
  args: [binary()],
  conn_id: non_neg_integer(),
  db: non_neg_integer(),
  name: name(),
  raw: term(),
  timestamp: integer()
}

A parsed Redis command.

Functions

from_array(list, conn_id, db)

@spec from_array([term()], non_neg_integer(), non_neg_integer()) :: t()

Builds a command struct from an array value decoded from RESP.

The first element is treated as the command name, remaining elements are treated as binary arguments.