server

package
v0.0.0-...-98a29f8 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTServer

type MQTTServer struct {
	Server *mqtt.Server
	Path   string
}
var MQTT_SERVER *MQTTServer

func NewMQTTServer

func NewMQTTServer(path string) *MQTTServer

func (*MQTTServer) Hook

func (s *MQTTServer) Hook(topic string, callbackFn func(cl *mqtt.Client, sub packets.Subscription, pk packets.Packet))

func (*MQTTServer) InitRouter

func (s *MQTTServer) InitRouter(topic string)

func (*MQTTServer) Publish

func (s *MQTTServer) Publish(topic string, message []byte) error

func (*MQTTServer) Run

func (s *MQTTServer) Run()

Jump to

Keyboard shortcuts

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