MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / CheckPayloadSize

Method CheckPayloadSize

internal/core/entry.go:138–143  ·  view source on GitHub ↗

CheckPayloadSize checks the payload size

(size int64)

Source from the content-addressed store, hash-verified

136
137// CheckPayloadSize checks the payload size
138func (e *Entry) CheckPayloadSize(size int64) error {
139 if e.Meta.PayloadSize() != size {
140 return ErrPayLoadSizeMismatch
141 }
142 return nil
143}
144
145// ParseMeta parse Meta object to entry
146func (e *Entry) ParseMeta(buf []byte) (int64, error) {

Callers 1

ReadEntryMethod · 0.80

Calls 1

PayloadSizeMethod · 0.80

Tested by

no test coverage detected