clients

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MqttSetOnConnectHandler 如果会话断开可以通过该回调函数来重新订阅消息
	//不使用mqtt的clean session是因为会话保持期间共享订阅也会给离线的客户端,这会导致在线的客户端丢失消息
	MqttSetOnConnectHandler func()
)

Functions

func NewMqttClient

func NewMqttClient(conf *conf.MqttConf) (mc mqtt.Client, err error)

func NewNatsClient

func NewNatsClient(conf conf.NatsConf) (nc *nats.Conn, err error)

Types

type MiniProgram added in v0.5.1

type MiniProgram = miniprogram.MiniProgram

func NewWxMiniProgram added in v0.5.1

func NewWxMiniProgram(ctx context.Context, conf WxMiniProgram, redisConf zeroCache.ClusterConf) *MiniProgram

type Td

type Td struct {
	Dsn string
	*sql.DB
}

func NewTDengine

func NewTDengine(DataSource string) (TD *Td, err error)

type WxMiniProgram added in v0.5.1

type WxMiniProgram struct {
	Open      bool //如果开启则需要初始化为true
	AppID     string
	AppSecret string
}

Jump to

Keyboard shortcuts

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