matching

package module
v0.0.0-...-9fc8f7d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

README

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadTopic = errors.New("Topic does not fit within topic space")

Functions

This section is empty.

Types

type Matcher

type Matcher interface {
	// Subscribe adds the Subscriber to the topic and returns a Subscription.
	Subscribe(topic string, sub Subscriber) (*Subscription, error)

	// Unsubscribe removes the Subscription.
	Unsubscribe(sub *Subscription)

	// Lookup returns the Subscribers for the given topic.
	Lookup(topic string) []Subscriber
}

Matcher contains topic subscriptions and performs matches on them.

func NewCSTrieMatcher

func NewCSTrieMatcher() Matcher

func NewInvertedBitmapMatcher

func NewInvertedBitmapMatcher(topicSpace []string) Matcher

func NewNaiveMatcher

func NewNaiveMatcher() Matcher

func NewOptimizedInvertedBitmapMatcher

func NewOptimizedInvertedBitmapMatcher(topicSpaceSize uint) Matcher

func NewTrieMatcher

func NewTrieMatcher() Matcher

type Subscriber

type Subscriber interface{}

Subscriber is a value associated with a subscription.

type Subscription

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

Subscription represents a topic subscription.

Jump to

Keyboard shortcuts

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