mqtthandler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTHandler

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

func New

func New(logger log.Logger, registry *prometheus.Registry, publisher apis.Publisher, opts ...Option) *MQTTHandler

func (*MQTTHandler) HandleFunc

func (h *MQTTHandler) HandleFunc(messageType byte, handlerFunc mqttserver.HandlerFunc)

func (*MQTTHandler) ServeMQTT

func (h *MQTTHandler) ServeMQTT(c mqttserver.Conn, p mqttcodec.ControlPacket)

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithAllowUnauthenticated

func WithAllowUnauthenticated(a []string) Option

func WithAuthenticator

func WithAuthenticator(a apis.UserPasswordAuthenticator) Option

func WithIgnoreUnsupported

func WithIgnoreUnsupported(a []string) Option

func WithPublishAsyncAtLeastOnce

func WithPublishAsyncAtLeastOnce(b bool) Option

func WithPublishAsyncAtMostOnce

func WithPublishAsyncAtMostOnce(b bool) Option

func WithPublishAsyncExactlyOnce

func WithPublishAsyncExactlyOnce(b bool) Option

func WithPublishTimeout

func WithPublishTimeout(d time.Duration) Option

Jump to

Keyboard shortcuts

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