Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRetry = fmt.Errorf("retry")
Functions ¶
Types ¶
type Event ¶
type Service ¶
type Service struct {
Prefix string
// contains filtered or unexported fields
}
func NewService ¶
func NewService(redisClient redis.UniversalClient, opt *Option) *Service
func (*Service) Ping ¶
心跳队列的成员就是 uid:同一个 uid 永远只有一条,每次心跳刷新它的分数。 早期版本把 Event(json, 含 retryCount) 当成员,重试路径会为同一个 uid 追加 retryCount 不同的副本,副本的分数不会被真实心跳刷新,老化后就把还在心跳的 uid 判成下线(调用方表现为健康连接被踢、客户端重连抖动)。
func (*Service) RegisterOfflineHandle ¶ added in v1.1.48
Click to show internal directories.
Click to hide internal directories.