MCPcopy Index your code
hub / github.com/CodisLabs/codis / EncodeToBytes

Function EncodeToBytes

pkg/proxy/redis/encoder.go:104–110  ·  view source on GitHub ↗
(r *Resp)

Source from the content-addressed store, hash-verified

102}
103
104func EncodeToBytes(r *Resp) ([]byte, error) {
105 var b = &bytes.Buffer{}
106 if err := Encode(b, r); err != nil {
107 return nil, err
108 }
109 return b.Bytes(), nil
110}
111
112func (e *Encoder) encodeResp(r *Resp) error {
113 if err := e.bw.WriteByte(byte(r.Type)); err != nil {

Callers 2

testEncodeAndCheckFunction · 0.85
newBenchmarkDecoderFunction · 0.85

Calls 1

EncodeFunction · 0.85

Tested by 2

testEncodeAndCheckFunction · 0.68
newBenchmarkDecoderFunction · 0.68