Skip to main content

Module resp

Module resp 

Source
Expand description

RESP (Redis Serialization Protocol) parser and serializer.

Implements RESP2, the wire protocol used by Redis. This allows pylon’s cache to be accessed by any standard Redis client library.

§Wire format

  • Simple strings: +OK\r\n
  • Errors: -ERR message\r\n
  • Integers: :1000\r\n
  • Bulk strings: $5\r\nhello\r\n (length-prefixed)
  • Arrays: *2\r\n$3\r\nfoo\r\n$3\r\nbar\r\n
  • Null: $-1\r\n

Enums§

RespValue
A RESP value.

Functions§

parse_resp
Parse a single RESP value from a buffered reader.