Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyRecords ¶
func CopyRecords(dst, src []Record)
func GenRecordsFiles ¶
func GenRecordsFiles(startBlockIndex int)
Types ¶
type FileBlockWriter ¶
type Record ¶
func GenRecords ¶
GenRecords 生成 Key 唯一且随机的包含 n 个 Record 的数组,data 数据随机
func ReadRecordsFile ¶
type RecordGenerator ¶
type RecordGenerator struct {
MaxKey int64 // Record.Key 最大值
DataSizeMin int // Record.Data 字段最小长度
DataSizeMax int // Record.Data 字段最大长度
}
func (*RecordGenerator) Generate ¶
func (g *RecordGenerator) Generate() Record
func (*RecordGenerator) Init ¶
func (g *RecordGenerator) Init()
type RecordKeyMaxHeap ¶
type RecordKeyMaxHeap []Record
func (RecordKeyMaxHeap) Len ¶
func (h RecordKeyMaxHeap) Len() int
func (RecordKeyMaxHeap) Less ¶
func (h RecordKeyMaxHeap) Less(i, j int) bool
func (*RecordKeyMaxHeap) Pop ¶
func (h *RecordKeyMaxHeap) Pop() interface{}
func (*RecordKeyMaxHeap) Push ¶
func (h *RecordKeyMaxHeap) Push(x interface{})
func (RecordKeyMaxHeap) Swap ¶
func (h RecordKeyMaxHeap) Swap(i, j int)
type SortByRecordKey ¶
type SortByRecordKey []Record
func (SortByRecordKey) Len ¶
func (h SortByRecordKey) Len() int
func (SortByRecordKey) Less ¶
func (h SortByRecordKey) Less(i, j int) bool
func (SortByRecordKey) Swap ¶
func (h SortByRecordKey) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.