g2emq

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTokenTimeout = errors.New("等待emq服务器Token超时")

ErrTokenTimeout declare

Functions

This section is empty.

Types

type Emq

type Emq struct {
	Config *g2util.Config `inject:""`
	// contains filtered or unexported fields
}

Emq ...

var EmqInstance *Emq

EmqInstance ..

func (*Emq) Client

func (e *Emq) Client() mqtt.Client

Client ...

func (*Emq) Constructor

func (e *Emq) Constructor()

Constructor ...

func (*Emq) Dial

func (e *Emq) Dial()

Dial ...

func (*Emq) EmqSuperAuth

func (e *Emq) EmqSuperAuth() (username, password string)

EmqSuperAuth ...

func (*Emq) Publish

func (e *Emq) Publish(topic string, payload interface{}) (err error)

Publish ...

func (*Emq) Subscribe

func (e *Emq) Subscribe(topic string, callback mqtt.MessageHandler) (err error)

Subscribe ...

Jump to

Keyboard shortcuts

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