mqtttest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mqtttest is a very small MQTT 3.1.1 broker for tests in other packages, so scripts can be tested without a real broker. It is only imported by tests, so it is not part of the vegaload binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {

	// User and Pass, when User is not empty, are the login the broker asks for.
	User, Pass string
	// contains filtered or unexported fields
}

Broker is just enough MQTT 3.1.1 for these tests: CONNECT, SUBSCRIBE and PUBLISH (QoS 0 and 1) with exact topic matching, and optional login.

func Start

func Start(t *testing.T) *Broker

func (*Broker) Published

func (b *Broker) Published() []string

Published lists what clients published, as "topic=payload".

func (*Broker) URL

func (b *Broker) URL() string

URL is the broker's address as an mqtt:// target.

Jump to

Keyboard shortcuts

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