agent

package
v0.0.0-...-3329fa7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent runs an mqtt client

func NewAgent

func NewAgent(address string, port int, user string, password string, clientID string) (a *Agent)

NewAgent creates an agent

func (*Agent) Close

func (a *Agent) Close()

Close agent

func (*Agent) Connect

func (a *Agent) Connect() (err error)

Connect opens a new connection

func (*Agent) IsTerminated

func (a *Agent) IsTerminated() bool

func (*Agent) Publish

func (a *Agent) Publish(topic string, retain bool, payload []byte) (err error)

Publish things

func (*Agent) Subscribe

func (a *Agent) Subscribe(topic string, handler mqtt.MessageHandler) (err error)

Subscribe to topic

Jump to

Keyboard shortcuts

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