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 ¶
func (r *ReOrderByTimeTickBuffer) Push(msg message.ImmutableMessage) error
Push pushes a message into the buffer.
Click to show internal directories.
Click to hide internal directories.