test_utils

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyIterator

func DummyIterator(ids float64, days float64, records int) iterator.RecordIterator[dummy]

DummyIterator will return a iterator.LesserIterator with pseudorandom data. The random generator is initialized with the _records_ parameter so DummyIterator(1,2,3) DummyIterator(1,2,3) would yield exactly the same series of records; while DummyIterator(1,2,3) DummyIterator(1,2,4) have a high chance of being completely different.

func NewDummyIteratorFromArr

func NewDummyIteratorFromArr[T any](arr []T) iterator.RecordIterator[T]

DummyIterator will return a RecordIterator based on the provided list of records

func NewDummyRecordPtr

func NewDummyRecordPtr() *dummy

NewDummyRecordPtr returns a new dummy record

Types

type SortableStruct

type SortableStruct struct {
	Val        int
	Partitions keyvaluelist.KeyValues
}

SortableStruct is a struct which implements the Lesser-interface

func (*SortableStruct) GetPartitions

func (s *SortableStruct) GetPartitions() (keyvaluelist.KeyValues, error)

func (*SortableStruct) Less

func (s *SortableStruct) Less(other interface{}) bool

Less answers if "other" is Less (should be sorted before) this struct

Jump to

Keyboard shortcuts

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