MCPcopy
hub / github.com/CodisLabs/codis / Encode

Method Encode

pkg/proxy/redis/encoder.go:66–76  ·  view source on GitHub ↗
(r *Resp, flush bool)

Source from the content-addressed store, hash-verified

64}
65
66func (e *Encoder) Encode(r *Resp, flush bool) error {
67 if e.Err != nil {
68 return errors.Trace(ErrFailedEncoder)
69 }
70 if err := e.encodeResp(r); err != nil {
71 e.Err = err
72 } else if flush {
73 e.Err = errors.Trace(e.bw.Flush())
74 }
75 return e.Err
76}
77
78func (e *Encoder) EncodeMultiBulk(multi []*Resp, flush bool) error {
79 if e.Err != nil {

Callers 8

StringMethod · 0.95
StringMethod · 0.95
ServeMethod · 0.95
TestBackendFunction · 0.45
NewFunction · 0.45
StartMethod · 0.45
loopWriterMethod · 0.45
EncodeFunction · 0.45

Calls 2

encodeRespMethod · 0.95
FlushMethod · 0.45

Tested by 2

ServeMethod · 0.76
TestBackendFunction · 0.36