topic

package
v0.0.0-...-80ab217 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 2 Imported by: 12

Documentation

Overview

Package topic implements MQTT topic matching

Index

Constants

View Source
const (
	Separator      = "/"
	Wildcard       = "#"
	PartWildcard   = "+"
	InternalPrefix = "$"
)

MQTT constants

Variables

This section is empty.

Functions

func Join

func Join(parts []string) string

Join topic parts

func Match

func Match(topic, filter string) bool

Match a topic to a filter

func MatchPath

func MatchPath(topicPath, filterPath []string) bool

MatchPath matches a separated topic to a filter

func Split

func Split(topic string) []string

Split a topic into parts

func ValidateFilter

func ValidateFilter(filter string) error

ValidateFilter validates a topic filter

func ValidateTopic

func ValidateTopic(topic string) error

ValidateTopic validates a topic name

Types

This section is empty.

Jump to

Keyboard shortcuts

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