models

package
v0.0.0-...-02b4230 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

*

*
* @author liangjf
* @create on 2020/6/4
* @version 1.0

*

*
* @author liangjf
* @create on 2020/6/4
* @version 1.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IModels

type IModels interface {
	//初始化
	Init() error
	//保存网关uuid映射
	SaveGatewayUUID(string, string) error
	//保存App和uuid映射
	SaveAppUUID(string, string) error
	//保存离线消息
	SaveExpireMsg(string, string, string, int64) error
	//删除网关uuid映射
	DeleteGatewayUUID(string) error
	//删除AppTag和uuid映射
	DeleteAppUUID(string, string) error
	//删除离线消息
	DeleteExpireMsg(string, string) error
	//获取网关uuid映射
	GetGatewayUUID(string) (string, error)
	//获取App和uuid映射
	GetAppUUID(string) ([]string, error)
}

func NewRedisModel

func NewRedisModel(nodes []string) IModels

type RedisModel

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

func (*RedisModel) DeleteAppUUID

func (m *RedisModel) DeleteAppUUID(uuid string, appTag string) error

DeleteAppUUID 删除AppTag和uuid映射

func (*RedisModel) DeleteExpireMsg

func (m *RedisModel) DeleteExpireMsg(uuid string, msgId string) error

DeleteExpireMsg 删除离线消息

func (*RedisModel) DeleteGatewayUUID

func (m *RedisModel) DeleteGatewayUUID(uuid string) error

DeleteGatewayUUID 删除网关uuid映射

func (*RedisModel) GetAppUUID

func (m *RedisModel) GetAppUUID(appTag string) ([]string, error)

获取App和uuid映射

func (*RedisModel) GetGatewayUUID

func (m *RedisModel) GetGatewayUUID(uuid string) (string, error)

获取网关uuid映射

func (*RedisModel) Init

func (m *RedisModel) Init() error

初始化

func (*RedisModel) SaveAppUUID

func (m *RedisModel) SaveAppUUID(uuid string, appTag string) error

SaveAppUUID 保存App和uuid映射

func (*RedisModel) SaveExpireMsg

func (m *RedisModel) SaveExpireMsg(uuid string, msgId string, msg string, expireTime int64) error

SaveExpireMsg 保存离线消息

func (*RedisModel) SaveGatewayUUID

func (m *RedisModel) SaveGatewayUUID(uuid string, gatewayAddr string) error

SaveGatewayUUID 保存网关uuid映射

Jump to

Keyboard shortcuts

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