simutil

package
v0.0.0-...-5d62787 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IDAllocator idAllocator

IDAllocator is used to alloc unique ID.

View Source
var Logger *zap.Logger

Logger is the global logger used for simulator.

Functions

func GenerateTableKey

func GenerateTableKey(tableID, rowID int64) []byte

GenerateTableKey generates the table key according to the table ID and row ID.

func GenerateTableKeys

func GenerateTableKeys(tableCount, size int) []string

GenerateTableKeys generates the table keys according to the table count and size.

func GenerateTiDBEncodedSplitKey

func GenerateTiDBEncodedSplitKey(start, end []byte) ([]byte, error)

GenerateTiDBEncodedSplitKey calculates the split key with start and end key, the keys are encoded according to the TiDB encoding rules.

func InitLogger

func InitLogger(l, file string)

InitLogger initializes the Logger with -log level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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