manager

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package manager 实现 session manager 所需要的公共方法。

Index

Constants

This section is empty.

Variables

View Source
var CanNotIdentifyErrSet = map[int]bool{
	errs.CodeConnCloseCantIdentify: true,
}

CanNotIdentifyErrSet 不能进行 identify 操作的错误码

View Source
var CanNotResumeErrSet = map[int]bool{
	errs.CodeConnCloseCantResume: true,
}

CanNotResumeErrSet 不能进行 resume 操作的错误码

Functions

func CalcInterval

func CalcInterval(maxConcurrency uint32) time.Duration

CalcInterval 根据并发要求,计算连接启动间隔

func CanNotIdentify

func CanNotIdentify(err error) bool

CanNotIdentify 是否是不能够 identify 的错误

func CanNotResume

func CanNotResume(err error) bool

CanNotResume 是否是不能够 resume 的错误

func CheckSessionLimit

func CheckSessionLimit(apInfo *dto.WebsocketAP) error

CheckSessionLimit 检查链接数是否达到限制,如果达到限制需要等待重置

Types

This section is empty.

Jump to

Keyboard shortcuts

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