resp

package
v0.0.0-...-ae4e79a Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package resp is an umbrella package which covers both the old RESP protocol (resp2) and the new one (resp3), allowing clients to choose which one they care to use

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LenReader

type LenReader interface {
	io.Reader
	Len() int64
}

LenReader adds an additional method to io.Reader, returning how many bytes are left till be read until an io.EOF is reached.

func NewLenReader

func NewLenReader(r io.Reader, l int64) LenReader

NewLenReader wraps an existing io.Reader whose length is known so that it implements LenReader

type Marshaler

type Marshaler interface {
	MarshalRESP(io.Writer) error
}

Marshaler is the interface implemented by types that can marshal themselves into valid RESP.

type Unmarshaler

type Unmarshaler interface {
	UnmarshalRESP(*bufio.Reader) error
}

Unmarshaler is the interface implemented by types that can unmarshal a RESP description of themselves.

Note that, unlike Marshaler, Unmarshaler _must_ take in a *bufio.Reader.

Directories

Path Synopsis
Package resp2 implements the original redis RESP protocol, a plaintext protocol which is also binary safe.
Package resp2 implements the original redis RESP protocol, a plaintext protocol which is also binary safe.

Jump to

Keyboard shortcuts

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