Versions in this module Expand all Collapse all v1 v1.0.3 Jul 19, 2020 v1.0.2 Jul 19, 2020 v1.0.1 Jul 8, 2020 v1.0.0 Jul 6, 2020 Changes in this version + const Gb + const Kb + const Mb + const StatusMerging + const StatusNotStarted + const StatusSorting + const StatusStarting + func CheckSort(index string, verbose bool) (bool, error) + func EntryComparer(a, b interface{}) int + func Quicksort(entries []*Entry) + type Entry struct + Digest []byte + Offset []byte + TapeIndex int + func (e *Entry) Value() uint64 + type Sorter struct + EntriesPerTape int + Heap *binaryheap.Heap + Index *os.File + IndexPath string + Info os.FileInfo + MaxMemory int + MaxPerTapeBufSize int + MaxWorkers int + MergeBufLen int + MergePercent float64 + NoTapeCleanup bool + NumberOfEntires int + NumberOfTapes int + Output *os.File + OutputPath string + Status string + TapeDir string + Tapes []*Tape + WorkerBufSize int + Workers []*Worker + func GetSorter(index, output string, maxWorkers, maxMemory int, tempDir string, ...) (*Sorter, error) + func (s *Sorter) CreateTape(id int, entriesPerTape int) *Tape + func (s *Sorter) Drain(outputBuf []*Entry) + func (s *Sorter) Get(index int) *Entry + func (s *Sorter) IsMergeCompleted() bool + func (s *Sorter) PopulateHeap() + func (s *Sorter) Start() + func (s *Sorter) TapesCompleted() int + type Tape struct + Dir string + Entries []*Entry + FileName string + ID int + Len int + MergeSize int + Position int + func (t *Tape) IsEndOfTape() bool + func (t *Tape) Pop() (*Entry, bool) + func (t *Tape) Prefetch(position int) + func (t *Tape) Save() + type Worker struct + ID int + MaxGoRoutines int + Queue <-chan *Tape + Quit chan bool + TapesCompleted int + Wg *sync.WaitGroup