Documentation ¶
Index ¶
- type KVChecksum
- func (c *KVChecksum) Add(other *KVChecksum)
- func (c *KVChecksum) MarshalJSON() ([]byte, error)
- func (c *KVChecksum) MarshalLogObject(encoder zapcore.ObjectEncoder) error
- func (c *KVChecksum) Sum() uint64
- func (c *KVChecksum) SumKVS() uint64
- func (c *KVChecksum) SumSize() uint64
- func (c *KVChecksum) Update(kvs []common.KvPair)
- func (c *KVChecksum) UpdateOne(kv common.KvPair)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVChecksum ¶
type KVChecksum struct {
// contains filtered or unexported fields
}
KVChecksum is the checksum of a collection of key-value pairs.
func MakeKVChecksum ¶
func MakeKVChecksum(bytes uint64, kvs uint64, checksum uint64) KVChecksum
MakeKVChecksum creates a new KVChecksum with the given checksum.
func NewKVChecksum ¶
func NewKVChecksum(checksum uint64) *KVChecksum
NewKVChecksum creates a new KVChecksum with the given checksum.
func NewKVChecksumWithKeyspace ¶
func NewKVChecksumWithKeyspace(k tikv.Codec) *KVChecksum
NewKVChecksumWithKeyspace creates a new KVChecksum with the given checksum and keyspace.
func (*KVChecksum) Add ¶
func (c *KVChecksum) Add(other *KVChecksum)
Add adds the checksum of another KVChecksum.
func (*KVChecksum) MarshalJSON ¶
func (c *KVChecksum) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*KVChecksum) MarshalLogObject ¶
func (c *KVChecksum) MarshalLogObject(encoder zapcore.ObjectEncoder) error
MarshalLogObject implements the zapcore.ObjectMarshaler interface.
func (*KVChecksum) SumKVS ¶
func (c *KVChecksum) SumKVS() uint64
SumKVS returns the total number of key-value pairs.
func (*KVChecksum) SumSize ¶
func (c *KVChecksum) SumSize() uint64
SumSize returns the total size of the key-value pairs.
func (*KVChecksum) Update ¶
func (c *KVChecksum) Update(kvs []common.KvPair)
Update updates the checksum with a batch of key-value pairs.
func (*KVChecksum) UpdateOne ¶
func (c *KVChecksum) UpdateOne(kv common.KvPair)
UpdateOne updates the checksum with a single key-value pair.