etree

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package etree provides a red-black tree for events. This package was intended for aggregate streams but isn't currently used by any package. TODO: delete package (?)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tree

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

Tree is a red-black tree that orders events by their aggregate version.

func (*Tree) Insert

func (t *Tree) Insert(evt event.Event)

Insert inserts an event into the Tree.

func (*Tree) Matrix

func (t *Tree) Matrix() [][]event.Event

Matrix returns the Tree as a slice of levels.

func (*Tree) Size

func (t *Tree) Size() int

Size returns the number of elements in the Tree.

func (*Tree) Walk

func (t *Tree) Walk(fn func(event.Event))

Walk walks the Tree in-order and calls fn on every event.

Jump to

Keyboard shortcuts

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