Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataManagerMemory ¶
type DataManagerMemory struct {
// contains filtered or unexported fields
}
func NewDataManagerMemory ¶
func NewDataManagerMemory(serverTimeoutSec int) *DataManagerMemory
func (*DataManagerMemory) AddPub ¶
func (d *DataManagerMemory) AddPub(streamName, serverId string)
func (*DataManagerMemory) DelPub ¶
func (d *DataManagerMemory) DelPub(streamName, serverId string)
func (*DataManagerMemory) QueryPub ¶
func (d *DataManagerMemory) QueryPub(streamName string) (serverId string, exist bool)
func (*DataManagerMemory) UpdatePub ¶
func (d *DataManagerMemory) UpdatePub(serverId string, streamNameList []string)
type DataManger ¶
type DataManger interface { AddPub(streamName, serverId string) DelPub(streamName, serverId string) QueryPub(streamName string) (serverId string, exist bool) // 1. 全量校正。比如自身服务重启了,lal节点重启了,或其他原因Add、Del消息丢失了 // 2. 心跳保活 UpdatePub(serverId string, streamNameList []string) }
func NewDataManager ¶
func NewDataManager(t DataManagerType, serverTimeoutSec int) DataManger
@param serverTimeoutSec 超过该时间间隔没有Update,则清空对应节点的所有信息
Click to show internal directories.
Click to hide internal directories.