Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockerWait ¶
type BlockerWait struct {
//等待时间
// 支持1-300秒范围,超出范围将自动回归数据
// 时间不能超过5分钟,避免主线程序线程耗尽
// 如果没有初始化,默认按5秒计算
WaitTime int
// contains filtered or unexported fields
}
BlockerWait 等待拦截器 * 1. 本模块用于持久性拦截一些重复请求,减少服务器压力。 2. 可用于统计数据拦截,当统计请求收到后,用此模块拦截处理,避免重复触发统计。
func (*BlockerWait) Check ¶
func (t *BlockerWait) Check(modID int64, modMark string) (isNewData bool, b bool)
Check 检查是否通行? isNewData 用于说明是新的数据,方便拦截器识别处理 b 用于说明是否通行,如果通行则需执行后续业务逻辑,否则请勿执行
type HighFBlocker ¶
type HighFBlocker struct {
//间隔时间秒
WaitSec int64
//是否仅拦截相同数据
OnlySameData bool
// contains filtered or unexported fields
}
HighFBlocker nats拦截器 拦截器主要阻拦不必要的消费处理,如高频数据等,一些敏感数据请勿使用
Click to show internal directories.
Click to hide internal directories.