Documentation ¶
Index ¶
Constants ¶
View Source
const MaxSlotNum = models.DEFAULT_SLOT_NUM
Variables ¶
View Source
var ( ErrBadRespType = errors.New("bad resp type for command") ErrBadOpStrLen = errors.New("bad command length, too short or too long") )
View Source
var ErrFailedRequest = errors.New("discard failed request")
View Source
var ErrRespIsRequired = errors.New("resp is required")
View Source
var ErrSlotIsNotReady = errors.New("slot is not ready, may be offline")
Functions ¶
Types ¶
type BackendConn ¶
type BackendConn struct {
// contains filtered or unexported fields
}
func NewBackendConn ¶
func NewBackendConn(addr, auth string) *BackendConn
func (*BackendConn) Addr ¶
func (bc *BackendConn) Addr() string
func (*BackendConn) Close ¶
func (bc *BackendConn) Close()
func (*BackendConn) KeepAlive ¶
func (bc *BackendConn) KeepAlive() bool
func (*BackendConn) PushBack ¶
func (bc *BackendConn) PushBack(r *Request)
func (*BackendConn) Run ¶
func (bc *BackendConn) Run()
type Dispatcher ¶
type FlushPolicy ¶
type FlushPolicy struct { *redis.Encoder MaxBuffered int MaxInterval int64 // contains filtered or unexported fields }
func (*FlushPolicy) Flush ¶
func (p *FlushPolicy) Flush(force bool) error
type OpStats ¶
type OpStats struct {
// contains filtered or unexported fields
}
func GetAllOpStats ¶
func GetAllOpStats() []*OpStats
func GetOpStats ¶
func (*OpStats) MarshalJSON ¶
type Session ¶
type Session struct { *redis.Conn Ops int64 LastOpUnix int64 CreateUnix int64 // contains filtered or unexported fields }
func NewSessionSize ¶
func (*Session) Serve ¶
func (s *Session) Serve(d Dispatcher, maxPipeline int)
type SharedBackendConn ¶
type SharedBackendConn struct { // contains filtered or unexported fields }
func NewSharedBackendConn ¶
func NewSharedBackendConn(addr, auth string) *SharedBackendConn
func (*SharedBackendConn) Close ¶
func (s *SharedBackendConn) Close() bool
func (*SharedBackendConn) IncrRefcnt ¶
func (s *SharedBackendConn) IncrRefcnt()
Click to show internal directories.
Click to hide internal directories.