utility

package
v0.0.0-...-34e0b2d Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReOrderByTimeTickBuffer

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

ReOrderByTimeTickBuffer is a buffer that stores messages and pops them in order of time tick.

func NewReOrderBuffer

func NewReOrderBuffer() *ReOrderByTimeTickBuffer

NewReOrderBuffer creates a new ReOrderBuffer.

func (*ReOrderByTimeTickBuffer) Len

func (r *ReOrderByTimeTickBuffer) Len() int

Len returns the number of messages in the buffer.

func (*ReOrderByTimeTickBuffer) PopUtilTimeTick

func (r *ReOrderByTimeTickBuffer) PopUtilTimeTick(timetick uint64) []message.ImmutableMessage

PopUtilTimeTick pops all messages whose time tick is less than or equal to the given time tick. The result is sorted by time tick in ascending order.

func (*ReOrderByTimeTickBuffer) Push

Push pushes a message into the buffer.

Jump to

Keyboard shortcuts

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