simple

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler implements mqtt.Handler interface

func New

func New(logger logger.Logger) *Handler

New creates new Event entity

func (*Handler) AuthConnect

func (h *Handler) AuthConnect(c *session.Client) error

AuthConnect is called on device connection, prior forwarding to the MQTT broker

func (*Handler) AuthPublish

func (h *Handler) AuthPublish(c *session.Client, topic *string, payload *[]byte) error

AuthPublish is called on device publish, prior forwarding to the MQTT broker

func (*Handler) AuthSubscribe

func (h *Handler) AuthSubscribe(c *session.Client, topics *[]string) error

AuthSubscribe is called on device publish, prior forwarding to the MQTT broker

func (*Handler) Connect

func (h *Handler) Connect(c *session.Client)

Connect - after client successfully connected

func (*Handler) Disconnect

func (h *Handler) Disconnect(c *session.Client)

Disconnect on conection lost

func (*Handler) Publish

func (h *Handler) Publish(c *session.Client, topic *string, payload *[]byte)

Publish - after client successfully published

func (*Handler) Subscribe

func (h *Handler) Subscribe(c *session.Client, topics *[]string)

Subscribe - after client successfully subscribed

func (*Handler) Unsubscribe

func (h *Handler) Unsubscribe(c *session.Client, topics *[]string)

Unsubscribe - after client unsubscribed

Jump to

Keyboard shortcuts

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