Documentation ¶
Index ¶
- Variables
- func ReadArray(r io.Reader) (int, error)
- func ReadBulkString(r io.Reader) (string, error)
- func ReadError(r io.Reader) (string, error)
- func ReadInteger(r io.Reader) (int64, error)
- func ReadSimpleString(r io.Reader) (string, error)
- func ReplyBulkString(w io.Writer, msg string) error
- func ReplyError(w io.Writer, msg string) error
- func ReplyInteger(w io.Writer, val int64) error
- func ReplyNullBulkString(w io.Writer) error
- func ReplySimpleString(w io.Writer, msg string) error
- type Decoder
- type Encoder
- type Reader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrInvalidProtocol indicates a wrong protocol format ErrInvalidProtocol = errors.New("invalid protocol") )
Functions ¶
func ReadBulkString ¶
ReadBulkString reads a bulkstring
func ReadSimpleString ¶
ReadSimpleString reads a simplestring
func ReplyBulkString ¶
ReplyBulkString replies a bulkstring
func ReplyNullBulkString ¶
ReplyNullBulkString replies a null bulkstring
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder implements the decoder interface
func (*Decoder) BulkString ¶
BulkString parses a RESP bulkstring
func (*Decoder) SimpleString ¶
SimpleString parses a RESP simplestring
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder implements the Encoder interface
func ReplyArray ¶
ReplyArray replies an array
func (*Encoder) BulkString ¶
BulkString builds a RESP bulkstring
func (*Encoder) NullBulkString ¶
NullBulkString builds a RESP null bulkstring
func (*Encoder) SimpleString ¶
SimpleString builds a RESP simplestring
Click to show internal directories.
Click to hide internal directories.