Documentation
¶
Index ¶
- Variables
- type CacheType
- type Decoder
- type Encoder
- type Handler
- type Pinger
- type Request
- func (r *Request) Batch() ([]Request, *Response)
- func (r *Request) BatchWait()
- func (r *Request) Cmd() string
- func (r *Request) Done(resp *Response)
- func (r *Request) DoneWithError(err error)
- func (r *Request) IsBatch() bool
- func (r *Request) Key() []byte
- func (r *Request) Process()
- func (r *Request) Proto() protoRequest
- func (r *Request) Since() time.Duration
- func (r *Request) Wait()
- func (r *Request) WithProto(proto protoRequest)
- type RequestChan
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSupportCacheType = errs.New("unsupported cache type")
)
errors
Functions ¶
This section is empty.
Types ¶
type Request ¶
Request read from client.
func (*Request) BatchWait ¶
func (r *Request) BatchWait()
BatchWait blocks until the all sub request done.
func (*Request) DoneWithError ¶
DoneWithError done with error.
type RequestChan ¶
type RequestChan struct {
// contains filtered or unexported fields
}
RequestChan is queue be used process request.
func NewRequestChan ¶
func NewRequestChan() *RequestChan
NewRequestChan new request chan, defalut buffer 128.
func NewRequestChanBuffer ¶
func NewRequestChanBuffer(n int) *RequestChan
NewRequestChanBuffer new request chan with buffer.
func (*RequestChan) PopFront ¶
func (c *RequestChan) PopFront() (*Request, bool)
PopFront pop front from queue.
func (*RequestChan) PushBack ¶
func (c *RequestChan) PushBack(r *Request) int
PushBack push request back queue.
Click to show internal directories.
Click to hide internal directories.