helpers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxDoubleSize = 100000

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	// contains filtered or unexported fields
}

func NewCheckpoint

func NewCheckpoint(path string) *Checkpoint

func (*Checkpoint) CheckSync

func (c *Checkpoint) CheckSync(index int64)

func (*Checkpoint) Close

func (c *Checkpoint) Close()

func (*Checkpoint) Frontier

func (c *Checkpoint) Frontier() int64

Frontier returns the max index of checked indexes.

func (*Checkpoint) Load

func (c *Checkpoint) Load()

func (*Checkpoint) Seen

func (c *Checkpoint) Seen(index int64) bool

Seen checks if the index is seen.

func (*Checkpoint) Track

func (c *Checkpoint) Track()

type Heap

type Heap []*TimeSkipNotification

A PriorityQueue implements heap.Interface and holds Items.

func (Heap) Len

func (h Heap) Len() int

func (Heap) Less

func (h Heap) Less(i, j int) bool

func (Heap) Peak

func (h Heap) Peak() *TimeSkipNotification

func (*Heap) Pop

func (h *Heap) Pop() interface{}

func (*Heap) Push

func (h *Heap) Push(x interface{})

func (Heap) Swap

func (h Heap) Swap(i, j int)

type TimeSkipNotification

type TimeSkipNotification struct {
	// contains filtered or unexported fields
}

func (*TimeSkipNotification) Wait

func (n *TimeSkipNotification) Wait()

type TimeSkipper

type TimeSkipper struct {
	// contains filtered or unexported fields
}

func NewTimeSkipper

func NewTimeSkipper(cap int) *TimeSkipper

func (*TimeSkipper) Mark

func (s *TimeSkipper) Mark(id int64, to time.Time) *TimeSkipNotification

func (*TimeSkipper) MarkDuration

func (s *TimeSkipper) MarkDuration(id int64, d time.Duration) *TimeSkipNotification

func (*TimeSkipper) MarkTimestamp

func (s *TimeSkipper) MarkTimestamp(id int64, ts int64) *TimeSkipNotification

func (*TimeSkipper) Skip

func (s *TimeSkipper) Skip(skip time.Duration)

func (*TimeSkipper) SkipAll

func (s *TimeSkipper) SkipAll() time.Duration

func (*TimeSkipper) SkipTo

func (s *TimeSkipper) SkipTo(planned time.Time)

Jump to

Keyboard shortcuts

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