Documentation ¶
Overview ¶
历史数据更新
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadPastData ¶
type LoadPastData struct { sync.Mutex Title string Close chan bool MsgChan chan *master.Msg // WS发送的消息管道 Conn *websocket.Conn // WS客户端 DataIndex public.DataIndex DataStorage *public.DataStorage StartTime int64 // 历史数据开始时间 EndTime int64 // 历史数据结束时间 LoadState chan bool // 历史数据是否全部加载完毕,从开始时间到结束时间的数据全都加载到了内存(DataStorage)中就算完毕 // contains filtered or unexported fields }
连续更新数据类型
func NewLoadPastData ¶
func NewLoadPastData(di public.DataIndex, ds *public.DataStorage, sTime, eTime int64) (lpd *LoadPastData, err error)
创建一个连续更新的实例
func (*LoadPastData) LoadFileCache ¶
func (this *LoadPastData) LoadFileCache(di public.DataIndex) (lastTime int64, err error)
通过DataIndex加载本地文件到内存,返回最后时间戳
func (*LoadPastData) SendMsg ¶
func (this *LoadPastData) SendMsg(msg *master.Msg)
给Master发送数据,队列的形式,防止WS并发写
Click to show internal directories.
Click to hide internal directories.