verification

package
v0.0.0-...-503c688 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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) Sum

func (c *KVChecksum) Sum() uint64

Sum returns the checksum.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL