store

package
v0.0.0-...-b3af538 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnContext

type ConnContext interface {
	// DeviceId 设备ID
	DeviceId() int64

	// UserId 用户ID
	UserId()

	// DeviceType 设备类型
	DeviceType() uint8

	// ConnectTime 连接到服务器时间
	ConnectTime() int64

	// IsAuth 是否鉴权
	IsAuth() bool

	// Close 关闭连接
	Close() error
}

type ConnMgr

type ConnMgr interface {
	// Add 添加一个新的conn,该conn未经过鉴权
	Add(ctx ConnContext)

	// GetByUid 通过uid获取
	GetByUid(uid int64, devices []ConnContext)

	GetByDeviceId(did int64) ConnContext

	// Remove 移除conn
	Remove(ctx ConnContext)
}

Jump to

Keyboard shortcuts

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