topic

package
v0.0.0-...-f12a32c Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: MIT Imports: 2 Imported by: 0

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