data_source

package
v0.0.0-...-54421ad Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: BSD-3-Clause Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HanderTickData

func HanderTickData(ch <-chan []model.Tb_tick_data)

本協程處理Source worker 数据收集.

worker會往ch裡面發送數據,獲取源數據發送到撮合模塊. @param ch:

func HandlerCmd

func HandlerCmd(workers SourceHandler, item interface{})

外部模块发送来的命处理方法

func Init

func Init()

Types

type SourceHandler

type SourceHandler struct {
	// contains filtered or unexported fields
}

func NewSourceHandler

func NewSourceHandler() SourceHandler

創建source handler處理對象

func (*SourceHandler) Append

func (this *SourceHandler) Append(code string)

添加一支股, 对应的起一个协程,用于获取 实时的逐笔交易数据。

func (*SourceHandler) GetTickDataChan

func (this *SourceHandler) GetTickDataChan() chan []model.Tb_tick_data

返回 channel

func (*SourceHandler) Remove

func (this *SourceHandler) Remove(code string)

刪除一支股票代碼.

刪除對應的股票數據獲取,關閉數據獲取協程. @parma: code: stock code

type Stocks

type Stocks map[string]source.ISourceWorker

每支要获取tick数据的股票(代码) 对应的是一个SourceWorker

Directories

Path Synopsis
基於ISourceWorker 實現的數據源獲取類.
基於ISourceWorker 實現的數據源獲取類.

Jump to

Keyboard shortcuts

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