app

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*mosquitto.Client
	// contains filtered or unexported fields
}

func NewApp

func NewApp(ctx context.Context, host string, qos int) (*App, error)

func (*App) ProcessEvent

func (app *App) ProcessEvent(evt *mosquitto.Event)

func (*App) Publish

func (app *App) Publish(topic, data string) error

Publish data to topic

func (*App) Run

func (app *App) Run(ctx context.Context, topics ...string) error

Subscribe to topics, wait until cancel then close app

Jump to

Keyboard shortcuts

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