subscription

package
v0.0.0-...-d5ac831 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTopicName      = errors.New("invalid topic name")
	ErrInvalidQos            = errors.New("invalid qos")
	ErrInvalidRetainHandling = errors.New("invalid retain handling")
)

Functions

This section is empty.

Types

type Subscription

type Subscription struct {
	// ShareName is the share name of a shared subscription.
	// set to "" if it is a non-shared subscription.
	ShareName string
	// TopicFilter is the topic filter which does not include the share name.
	TopicFilter string
	// ID is the subscription identifier
	ID uint32

	// QoS is the qos level of the Subscription.
	QoS packet.QoS
	// NoLocal is the No Local option.
	NoLocal bool
	// RetainAsPublished is the Retain As Published option.
	RetainAsPublished bool
	// RetainHandling the Retain Handling option.
	RetainHandling byte
}

Subscription represents a subscription in lighthouse.

func (*Subscription) Copy

func (s *Subscription) Copy() *Subscription

Copy makes a copy of subscription.

func (*Subscription) GetFullTopicName

func (s *Subscription) GetFullTopicName() string

GetFullTopicName returns the full topic name of the subscription.

func (*Subscription) Validate

func (s *Subscription) Validate() error

Validate returns whether the subscription is valid. If you can ensure the subscription is valid then just skip the validation.

Jump to

Keyboard shortcuts

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