qos0

package
v0.0.0-...-edd4e79 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(s0 *QoS0)

func WithPublishListener

func WithPublishListener(listener broker.PublishListener) Option

func WithPublishWriter

func WithPublishWriter(writer broker.PublishWriter) Option

func WithSubOption

func WithSubOption(option *proto.SubOption) Option

type QoS0

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

QoS0 is Topic with QoS0

func NewQoS0

func NewQoS0(topic string, option ...Option) *QoS0

func (*QoS0) Close

func (t *QoS0) Close() error

Close closes the QoS0

func (*QoS0) Publish

func (t *QoS0) Publish(publish *packet.PublishMessage) error

func (*QoS0) Start

func (t *QoS0) Start(ctx context.Context)

Start starts the QoS0 Topic, and it will block until the context is done. It will create a publish event listener to listen the publish event of the store.

Jump to

Keyboard shortcuts

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