Documentation ¶
Index ¶
Constants ¶
View Source
const ( D_OK = 0x00000000 // 数据正常 D_ERROR = 0x40000000 // 数据错误 D_ECODE = 0x00000001 // 代码错误 D_ENET = 0x00000002 // 网络异常 D_EDATA = 0x00000004 // 数据错误 D_EDISK = 0x00000008 // 写文件错误 D_ENEED = 0x00000010 // 不需要更新 )
View Source
const ( // CACHE_DIR_MODE 目录权限 CACHE_DIR_MODE os.FileMode = 0755 // CACHE_FILE_MODE 文件权限 CACHE_FILE_MODE os.FileMode = 0644 // DEBUG 调试开关 DEBUG = false // CACHE_REPLACE 文件替换模式, 会用到os.TRUNC CACHE_REPLACE = os.O_CREATE | os.O_RDWR | os.O_TRUNC // CACHE_UPDATE 更新 CACHE_UPDATE = os.O_CREATE | os.O_WRONLY )
View Source
const ( // USEC_PER_SEC number of microseconds per second USEC_PER_SEC int64 = 1000000 // MsecPerSec number of milliseconds per second MsecPerSec int64 = 1000 // SecondOfDay 一天的秒数 SecondOfDay int64 = 24 * 60 * 60 // MillisecondsOfDay 一天的毫秒数 MillisecondsOfDay int64 = SecondOfDay * MsecPerSec // RealTimenterval 实时数据间隔时间, 单位毫秒 RealTimenterval int64 = 5 * 1000 // NullState 正常状态, 字符串"01" NullState = "00" NormalState = "01" // 历史数据获取的时间, 时, 分, 秒 HistoryUpdateHour = 17 HistoryUpdateMin = 0 HistoryUpdateSec = 0 CACHE_DATE = "20060102" // 缓存日期 INDEX_DATE = "2006-01-02" // 索引日期格式 TDX_DATE = "20060102" // 通达信日期 YearOnly = "2006" )
View Source
const (
NetworkMaxRetries = 3 // 网络最大重试3次
)
Variables ¶
View Source
var ( // DATA_ROOT_PATH 数据根路径 DATA_ROOT_PATH = "~/.quant1x" // KLINE_PATH 日线数据文件路径 KLINE_PATH = DATA_ROOT_PATH + "/day" // LOG_ROOT_PATH 日志路径 LOG_ROOT_PATH = DATA_ROOT_PATH + "/logs" )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.