Documentation ¶
Index ¶
Constants ¶
View Source
const ( CR byte = '\r' LF byte = '\n' )
View Source
const ( ASKING = "asking" MOVED = "moved" ASK = "ask" CLUSTERDOWN = "clusterdown" )
Variables ¶
View Source
var ( // ErrBadRespType represents bad resp type ErrBadRespType = errors.New("bad resp type") // ErrBadCRLFEnd for invalid crlf ErrBadCRLFEnd = errors.New("bad CRLF end") // ErrBadArrayLen for invalid array len ErrBadArrayLen = errors.New("bad array len") // ErrBadArrayLenTooLong too long array len ErrBadArrayLenTooLong = errors.New("bad array len, too long") // ErrBadBulkStringLen for invalid bulk string len ErrBadBulkStringLen = errors.New("bad bulk string len") // ErrBadBulkStringLenTooLong for too long bulk string len ErrBadBulkStringLenTooLong = errors.New("bad bulk string len, too long") // ErrBadMultiBulkLen for invalid multi-bulk len ErrBadMultiBulkLen = errors.New("bad multi-bulk len") // ErrBadMultiBulkContent for invalid multi-bulk content ErrBadMultiBulkContent = errors.New("bad multi-bulk content, should be bulkbytes") )
View Source
var ( ErrFilterNotFound = errors.New("error filter not found") ErrFilterIsNull = errors.New("filter is null") ErrFilterExist = errors.New("filter exist") ErrFilterNotExist = errors.New("filter not exist") )
View Source
var CRLF = []byte{CR, LF}
crlf is the delimter in redis protocol.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter interface { // cmd is always lowercase. Do(cmd string, req *simpleRequest) FilterStatus Destroy() }
Filter is used to filter the request to backend.
type FilterChain ¶
type FilterChain struct {
// contains filtered or unexported fields
}
FilterChain is a set of filters
func (*FilterChain) Do ¶
func (c *FilterChain) Do(r *simpleRequest) FilterStatus
Do call all filters in FilterChain
type FilterStatus ¶
type FilterStatus string
FilterStatus type
const ( Continue FilterStatus = "Continue" Stop FilterStatus = "Stop" )
FilterStatus types
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements Reader for buffer
func NewReaderSize ¶
NewReaderSize creates Reader with buffer size
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package compressor is a generated GoMock package.
|
Package compressor is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.