mqtt

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IManagement added in v0.0.20

type IManagement interface {
	GetClients(limit, offset int) (list []*management.ClientInfo, total int, err error)
	GetClient(clientId string) (client *management.ClientInfo, err error)
	GetSessions(limit, offset int) (list []*management.SessionInfo, total int, err error)
	GetSession(clientId string) (session *management.SessionInfo, err error)
	GetSubscriptions(clientId string, limit, offset int) (list []*management.SubscriptionInfo, total int, err error)
	Subscribe(clientId, topic string, qos int) (err error)
	Unsubscribe(clientId, topic string) (err error)
	Publish(topic string, qos int, payload []byte, retain bool) (err error)
	CloseClient(clientId string) (err error)
	SearchTopic(query string) (result []*management.SubscriptionInfo, err error)
}

type Mqtt

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

func NewMqtt

func NewMqtt(cfg *MqttConfig,
	graceful *graceful_service.GracefulService,
	authenticator *mqtt_authenticator.Authenticator,
	scriptService *scripts.ScriptService) (mqtt *Mqtt)

func (*Mqtt) Management added in v0.0.20

func (m *Mqtt) Management() IManagement

func (*Mqtt) NewClient

func (m *Mqtt) NewClient(cfg *mqtt_client.Config) (c *mqtt_client.Client, err error)

func (*Mqtt) OnConnect added in v0.0.19

func (m *Mqtt) OnConnect(cs gmqtt.ChainStore, client gmqtt.Client) (code uint8)

func (*Mqtt) OnConnected added in v0.0.19

func (m *Mqtt) OnConnected(cs gmqtt.ChainStore, client gmqtt.Client)

func (*Mqtt) OnSessionCreated added in v0.0.19

func (m *Mqtt) OnSessionCreated(cs gmqtt.ChainStore, client gmqtt.Client)

func (*Mqtt) OnSessionResumed added in v0.0.19

func (m *Mqtt) OnSessionResumed(cs gmqtt.ChainStore, client gmqtt.Client)

func (*Mqtt) Publish added in v0.0.25

func (m *Mqtt) Publish(topic string, payload []byte, qos uint8, retain bool)

func (*Mqtt) Shutdown

func (m *Mqtt) Shutdown()

type MqttBind added in v0.0.19

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

Javascript Binding

mqtt

.publish

func NewMqttBind added in v0.0.19

func NewMqttBind(mqtt *Mqtt) *MqttBind

func (MqttBind) Publish added in v0.0.19

func (m MqttBind) Publish(topic string, payload []byte, qos uint8, retain bool)

type MqttConfig

type MqttConfig struct {
	Port                       int
	RetryInterval              time.Duration
	RetryCheckInterval         time.Duration
	SessionExpiryInterval      time.Duration
	SessionExpireCheckInterval time.Duration
	QueueQos0Messages          bool
	MaxInflight                int
	MaxAwaitRel                int
	MaxMsgQueue                int
	DeliverMode                gmqtt.DeliverMode
}

func NewMqttConfig

func NewMqttConfig(cfg *config.AppConfig) *MqttConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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