broker

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const MODULE = "broker"

Variables

This section is empty.

Functions

func GinBridge

func GinBridge(ctx *gin.Context)

func Publish

func Publish(topic string, payload any) (err error)

func Shutdown

func Shutdown() error

func Startup

func Startup() (err error)

Types

type Hook

type Hook struct {
	mqtt.HookBase
}

func (*Hook) ID

func (h *Hook) ID() string

func (*Hook) OnACLCheck

func (h *Hook) OnACLCheck(cl *mqtt.Client, topic string, write bool) bool

func (*Hook) OnConnectAuthenticate

func (h *Hook) OnConnectAuthenticate(cl *mqtt.Client, pk packets.Packet) bool

func (*Hook) OnDisconnect

func (h *Hook) OnDisconnect(cl *mqtt.Client, err error, expire bool)

func (*Hook) OnSubscribed

func (h *Hook) OnSubscribed(cl *mqtt.Client, pk packets.Packet, reasonCodes []byte)

func (*Hook) OnUnsubscribed

func (h *Hook) OnUnsubscribed(cl *mqtt.Client, pk packets.Packet)

func (*Hook) Provides

func (h *Hook) Provides(b byte) bool

Jump to

Keyboard shortcuts

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