mqttutils

package
v0.0.0-...-8a984d7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: BSD-3-Clause Copyright 2022 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinErrors

func JoinErrors(errs ...error) error

JoinErrors returns an error that wraps the given errors. This is a copy from errors.Join. Will be replaced after errors.Join released, 1.20

func Publish

func Publish(cli mqtt.Client, topic string, qos int, payload []byte) error

Publish is a utility function about subscribing topics Note: retain always false

func Subscribe

func Subscribe(cli mqtt.Client, topics []string, qos int, callback mqtt.MessageHandler) error

Subscribe is a utility function about subscribing topics

func Unsubscribe

func Unsubscribe(cli mqtt.Client, topics []string) error

Unsubscribe is a utility function about unsubscribing topics

Types

This section is empty.

Jump to

Keyboard shortcuts

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