Documentation
¶
Index ¶
- func IsErrReply(reply Reply) bool
- func IsOKReply(reply Reply) bool
- type ArgNumErrReply
- type BulkReply
- type EmptyMultiBulkReply
- type GenericErrReply
- type IntegerReply
- type MixReply
- type MultiBulkReply
- type NoReply
- type NullBulkReply
- type OKReply
- type PONGReply
- type QueuedReply
- type Reply
- type SimpleErrReply
- type SimpleReply
- type SyntaxErrReply
- type UnknownErrReply
- type WrongTypeErrReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrReply ¶
Types ¶
type ArgNumErrReply ¶
type ArgNumErrReply struct {
Cmd string
}
命令参数数量错误
func NewArgNumErrReply ¶
func NewArgNumErrReply(cmd string) *ArgNumErrReply
func (*ArgNumErrReply) ToBytes ¶
func (r *ArgNumErrReply) ToBytes() []byte
type BulkReply ¶
type BulkReply struct {
Arg []byte
}
二进制安全 单个bulk $3\r\nkey\r\n
func NewBulkReply ¶
type EmptyMultiBulkReply ¶
type EmptyMultiBulkReply struct { }
func NewEmptyMultiBulkReply ¶
func NewEmptyMultiBulkReply() *EmptyMultiBulkReply
func (*EmptyMultiBulkReply) ToBytes ¶
func (e *EmptyMultiBulkReply) ToBytes() []byte
type GenericErrReply ¶
type GenericErrReply struct {
Status string
}
一般错误 -ERR xxxxx
func NewGenericErrReply ¶
func NewGenericErrReply(status string) *GenericErrReply
func (*GenericErrReply) ToBytes ¶
func (s *GenericErrReply) ToBytes() []byte
type IntegerReply ¶
type IntegerReply struct {
Integer int64
}
Integer :3\r\n
func NewIntegerReply ¶
func NewIntegerReply(integer int64) *IntegerReply
func (*IntegerReply) ToBytes ¶
func (i *IntegerReply) ToBytes() []byte
type MultiBulkReply ¶
type MultiBulkReply struct {
RedisCommand [][]byte
}
二进制安全 多个bulk *2\r\n$5\r\nhello\r\n$5\r\nworld\r\n
func NewMultiBulkReply ¶
func NewMultiBulkReply(command [][]byte) *MultiBulkReply
func (*MultiBulkReply) ToBytes ¶
func (r *MultiBulkReply) ToBytes() []byte
type NullBulkReply ¶
type NullBulkReply struct{}
func NewNullBulkReply ¶
func NewNullBulkReply() *NullBulkReply
func (*NullBulkReply) ToBytes ¶
func (n *NullBulkReply) ToBytes() []byte
type QueuedReply ¶
type QueuedReply struct{}
func NewQueuedReply ¶
func NewQueuedReply() *QueuedReply
func (*QueuedReply) ToBytes ¶
func (r *QueuedReply) ToBytes() []byte
type SimpleErrReply ¶
type SimpleErrReply struct {
Status string
}
自定义错误 - xxxxx
func NewSimpleErrReply ¶
func NewSimpleErrReply(status string) *SimpleErrReply
func (*SimpleErrReply) ToBytes ¶
func (s *SimpleErrReply) ToBytes() []byte
type SimpleReply ¶
type SimpleReply struct {
Str string
}
简单字符串
func NewSimpleReply ¶
func NewSimpleReply(str string) *SimpleReply
func (*SimpleReply) ToBytes ¶
func (s *SimpleReply) ToBytes() []byte
type SyntaxErrReply ¶
type SyntaxErrReply struct{}
语法错误
func NewSyntaxErrReply ¶
func NewSyntaxErrReply() *SyntaxErrReply
func (*SyntaxErrReply) ToBytes ¶
func (s *SyntaxErrReply) ToBytes() []byte
type UnknownErrReply ¶
type UnknownErrReply struct{}
未知错误 -ERR unknown
func NewUnknownErrReply ¶
func NewUnknownErrReply() *UnknownErrReply
func (*UnknownErrReply) ToBytes ¶
func (r *UnknownErrReply) ToBytes() []byte
type WrongTypeErrReply ¶
type WrongTypeErrReply struct{}
底层数据类型错误
func NewWrongTypeErrReply ¶
func NewWrongTypeErrReply() *WrongTypeErrReply
func (*WrongTypeErrReply) ToBytes ¶
func (r *WrongTypeErrReply) ToBytes() []byte
Click to show internal directories.
Click to hide internal directories.