MCPcopy Create free account
hub / github.com/HDT3213/rdb / write

Method write

core/encoder.go:147–157  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

145}
146
147func (enc *Encoder) write(p []byte) error {
148 _, err := enc.writer.Write(p)
149 if err != nil {
150 return fmt.Errorf("write data failed: %v", err)
151 }
152 _, err = enc.crc.Write(p)
153 if err != nil {
154 return fmt.Errorf("update crc table failed: %v", err)
155 }
156 return nil
157}
158
159var rdbHeaderRedis = []byte("REDIS0011")
160var rdbHeaderValkey = []byte("VALKEY080")

Callers 15

writeSetEncodingMethod · 0.95
writeHashEncodingMethod · 0.95
writeHashEncodingExMethod · 0.95
writeHash2EncodingMethod · 0.95
writeLengthMethod · 0.95
writeSimpleStringMethod · 0.95
tryWriteIntStringMethod · 0.95
writeLZFStringMethod · 0.95
WriteStringObjectMethod · 0.95
writeFloat64Method · 0.95

Calls 1

WriteMethod · 0.80

Tested by 1

TestModuleTypeFunction · 0.76