bst

package
v2.8.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BST

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

BST ...

func (*BST) Contains

func (b *BST) Contains(topic string) bool

func (*BST) Get

func (b *BST) Get(topic string) map[string]struct{}

func (*BST) Insert

func (b *BST) Insert(uuid string, topic string)

Insert uuid to the topic

func (*BST) Remove

func (b *BST) Remove(uuid string, topic string)

type Storage

type Storage interface {
	// Insert inserts to a vertex with topic ident connection uuid
	Insert(uuid string, topic string)
	// Remove removes uuid from topic, if the uuid is single for a topic, whole vertex will be removed
	Remove(uuid, topic string)
	// Get will return all connections associated with the topic
	Get(topic string) map[string]struct{}
	// Contains checks if the BST contains a topic
	Contains(topic string) bool
}

Storage is general in-memory BST storage implementation

func NewBST

func NewBST() Storage

Jump to

Keyboard shortcuts

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