memorysorter

package
v0.0.0-...-be15534 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package memorysorter is an in-memory event sorter implementation.

Index

Constants

View Source
const DDLPullerTableName = "DDL_PULLER"

DDLPullerTableName is the fake table name for ddl puller

Variables

This section is empty.

Functions

func InitMetrics

func InitMetrics(registry *prometheus.Registry)

InitMetrics registers all metrics in this file

Types

type EntrySorter

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

EntrySorter accepts out-of-order raw kv entries and output sorted entries. For now, it only uses for DDL puller and test.

func NewEntrySorter

func NewEntrySorter(changeFeedID model.ChangeFeedID) *EntrySorter

NewEntrySorter creates a new EntrySorter

func (*EntrySorter) AddEntry

func (es *EntrySorter) AddEntry(_ context.Context, entry *model.PolymorphicEvent)

AddEntry adds an RawKVEntry to the EntryGroup

func (*EntrySorter) Output

func (es *EntrySorter) Output() <-chan *model.PolymorphicEvent

Output returns the sorted raw kv output channel

func (*EntrySorter) Run

func (es *EntrySorter) Run(ctx context.Context) error

Run runs EntrySorter

Jump to

Keyboard shortcuts

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