Documentation ¶
Index ¶
- Variables
- func Encode(w *bufio.Writer, r Resp) error
- func EncodeToBytes(r Resp) ([]byte, error)
- func EncodeToString(r Resp) (string, error)
- func MustEncode(w *bufio.Writer, r Resp)
- func MustEncodeToBytes(r Resp) []byte
- func ParseArgs(resp Resp) (cmd string, args [][]byte, err error)
- type Array
- type BulkBytes
- type Error
- type Int
- type Ping
- type Resp
- func Decode(r *bufio.Reader) (Resp, error)
- func DecodeFromBytes(p []byte) (Resp, error)
- func DecodeRequest(r *bufio.Reader) (Resp, error)
- func DecodeRequestFromBytes(p []byte) (Resp, error)
- func MustDecode(r *bufio.Reader) Resp
- func MustDecodeFromBytes(p []byte) Resp
- func NewRequest(cmd string, args ...interface{}) Resp
- type RespType
- type String
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EncodeToBytes ¶
func EncodeToString ¶
func MustEncode ¶
func MustEncodeToBytes ¶
Types ¶
type Array ¶
type Array struct {
Value []Resp
}
func (*Array) AppendBulkBytes ¶
func (*Array) AppendError ¶
func (*Array) AppendString ¶
type BulkBytes ¶
type BulkBytes struct {
Value []byte
}
func NewBulkBytes ¶
func NewBulkBytesWithString ¶
type Resp ¶
type Resp interface {
Type() RespType
}
func DecodeFromBytes ¶
func DecodeRequest ¶
Decode RESP Request, return must be array type or ping type
func DecodeRequestFromBytes ¶
func MustDecode ¶
func MustDecodeFromBytes ¶
func NewRequest ¶
RESP Request is a array of bulk strings.
Click to show internal directories.
Click to hide internal directories.