mqtt

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mqtt implements the MQTT transport for CoreC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMQTTTransport

func NewMQTTTransport(config core.TransportConfig) (core.Transport, error)

NewMQTTTransport creates a new MQTT transport from configuration.

Types

type MQTTTransport

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

MQTTTransport implements core.Transport for MQTT protocol.

func (*MQTTTransport) Init

func (t *MQTTTransport) Init(ctx context.Context, config core.TransportConfig) error

func (*MQTTTransport) Name

func (t *MQTTTransport) Name() string

func (*MQTTTransport) OnCommand

func (t *MQTTTransport) OnCommand() <-chan core.WriteCommand

func (*MQTTTransport) OnData

func (t *MQTTTransport) OnData() <-chan core.DataPoint

OnData returns the channel of data points received from the subscribed data topic. Returns a non-nil channel only when data-topic is configured.

func (*MQTTTransport) Publish

func (t *MQTTTransport) Publish(ctx context.Context, point core.DataPoint) error

func (*MQTTTransport) PublishBatch

func (t *MQTTTransport) PublishBatch(ctx context.Context, points []core.DataPoint) error

func (*MQTTTransport) Start

func (t *MQTTTransport) Start(ctx context.Context) error

func (*MQTTTransport) Status

func (t *MQTTTransport) Status() core.TransportStatus

func (*MQTTTransport) Stop

func (t *MQTTTransport) Stop() error

func (*MQTTTransport) Type

func (t *MQTTTransport) Type() string

Jump to

Keyboard shortcuts

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