subscription

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: 3 Imported by: 0

Documentation

Overview

Package subscription implements MQTT topic subscriptions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

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

List of MQTT topic subscriptions

func (*List) Add

func (s *List) Add(filter string, qos byte) (added bool)

Add a subscription to the list

func (*List) Clear

func (s *List) Clear()

Clear the subscription list

func (*List) Count

func (s *List) Count() (count int)

Count the subscriptions

func (*List) Match

func (s *List) Match(t ...string) (qos byte, found bool)

Match the topic to the subscriptions and return the maximum QoS

func (*List) Matches

func (s *List) Matches(t ...string) (matches []string)

Matches for the topic

func (*List) Remove

func (s *List) Remove(filter string) (removed bool)

Remove a subscription from the list

func (*List) Subscriptions

func (s *List) Subscriptions() map[string]byte

Subscriptions returns the subscriptions in the list

Jump to

Keyboard shortcuts

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