memory

package
v0.0.0-...-a345a4b Latest Latest
Warning

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

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

Documentation

Overview

Package memory is an in-memory EventSorter implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMetrics

func InitMetrics(registry *prometheus.Registry)

InitMetrics registers all metrics in this file

func SortOutput

func SortOutput(ctx context.Context, input <-chan *model.RawKVEntry) <-chan *model.RawKVEntry

SortOutput receives a channel from a puller, then sort event and output to the channel returned.

Types

type EntrySorter

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

EntrySorter accepts out-of-order raw kv entries and output sorted entries

func NewEntrySorter

func NewEntrySorter() *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

func (*EntrySorter) TryAddEntry

func (es *EntrySorter) TryAddEntry(ctx context.Context, entry *model.PolymorphicEvent) (bool, error)

Jump to

Keyboard shortcuts

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