resp

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package resp implements the subset of the Redis serialization protocol that Tile38 speaks: commands out as arrays of bulk strings, replies in as strings, integers, arrays, and nulls.

RESP2 only. Tile38 does not implement HELLO, so there are no RESP3 push or double types to handle, and numbers other than integers arrive as bulk strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendCommand

func AppendCommand(buf []byte, args []any) ([]byte, error)

AppendCommand encodes args onto buf as a RESP array of bulk strings.

func ReadReply

func ReadReply(r *bufio.Reader) (any, error)

ReadReply decodes one RESP value. Bulk and simple strings decode to string, integers to int64, arrays to []any, and nulls to nil — the four types every parse helper in the parent package is written against.

Types

type Error

type Error string

Error is an error reply from Tile38 ("-ERR ..."). It means the command was rejected, not that the connection broke, so the connection stays usable.

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL