mqtt

package module
v2.0.0-...-381e388 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBroker

func NewBroker(opts ...broker.Option) broker.Broker

NewBroker news broker instance with options

func WithAuth

func WithAuth(username string, password string) broker.Option

WithAuth set username & password options

func WithAutoReconnect

func WithAutoReconnect(enable bool) broker.Option

WithAutoReconnect enable aut reconnect option

func WithCleanSession

func WithCleanSession(enable bool) broker.Option

WithCleanSession enable clean session option

func WithClientId

func WithClientId(clientId string) broker.Option

WithClientId set client id option

func WithCriticalLogger

func WithCriticalLogger() broker.Option

WithCriticalLogger .

func WithDebugLogger

func WithDebugLogger() broker.Option

WithDebugLogger .

func WithErrorLogger

func WithErrorLogger() broker.Option

WithErrorLogger .

func WithLogger

func WithLogger(opt LoggerOptions) broker.Option

WithLogger .

func WithOrderMatters

func WithOrderMatters(enable bool) broker.Option

WithOrderMatters .

func WithPublishQos

func WithPublishQos(qos byte) broker.PublishOption

WithPublishQos QOS

func WithPublishRetained

func WithPublishRetained(qos byte) broker.PublishOption

WithPublishRetained retained

func WithResumeSubs

func WithResumeSubs(enable bool) broker.Option

WithResumeSubs .

func WithSubscribeQos

func WithSubscribeQos(qos byte) broker.SubscribeOption

WithSubscribeQos QOS

func WithWarnLogger

func WithWarnLogger() broker.Option

WithWarnLogger .

Types

type AuthRecord

type AuthRecord struct {
	Username string
	Password string
}

type CriticalLogger

type CriticalLogger struct{}

func (CriticalLogger) Printf

func (CriticalLogger) Printf(format string, v ...interface{})

Printf .

func (CriticalLogger) Println

func (CriticalLogger) Println(v ...interface{})

Println .

type DebugLogger

type DebugLogger struct{}

func (DebugLogger) Printf

func (DebugLogger) Printf(format string, v ...interface{})

Printf .

func (DebugLogger) Println

func (DebugLogger) Println(v ...interface{})

Println .

type ErrorLogger

type ErrorLogger struct{}

func (ErrorLogger) Printf

func (ErrorLogger) Printf(format string, v ...interface{})

Printf .

func (ErrorLogger) Println

func (ErrorLogger) Println(v ...interface{})

Println .

type LoggerOptions

type LoggerOptions struct {
	Error    bool
	Critical bool
	Warn     bool
	Debug    bool
}

type WarnLogger

type WarnLogger struct{}

func (WarnLogger) Printf

func (WarnLogger) Printf(format string, v ...interface{})

Printf .

func (WarnLogger) Println

func (WarnLogger) Println(v ...interface{})

Println .

Jump to

Keyboard shortcuts

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