Documentation ¶
Index ¶
- func RegisterCacheLoader(key string, loader CacheAdapter)
- func SwitchDate(date string)
- type Cache1D
- func (this *Cache1D[T]) Apply(merge func(code string, local *T) (updated bool))
- func (this *Cache1D[T]) Checkout(date ...string)
- func (this *Cache1D[T]) Factory(date, securityCode string) features.Feature
- func (this *Cache1D[T]) Get(securityCode string, date ...string) *T
- func (this *Cache1D[T]) Init(barIndex *int, date string) error
- func (this *Cache1D[T]) Kind() cache.Kind
- func (this *Cache1D[T]) Length() int
- func (this *Cache1D[T]) Merge(p *treemap.Map)
- func (this *Cache1D[T]) Name() string
- func (this *Cache1D[T]) ReplaceCache()
- func (this *Cache1D[T]) Set(securityCode string, newValue T, date ...string)
- type CacheAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCacheLoader ¶
func RegisterCacheLoader(key string, loader CacheAdapter)
func SwitchDate ¶
func SwitchDate(date string)
Types ¶
type Cache1D ¶
type Cache1D[T features.Feature] struct { Key string // 缓存关键字 Date string // 日期 // contains filtered or unexported fields }
Cache1D 每天1个证券代码1条数据
func NewCache1D ¶
func NewCache1D[T features.Feature](key string, factory func(date, securityCode string) T) *Cache1D[T]
NewCache1D 创建一个新的C1D对象
key支持多级相对路径, 比如a/b, 创建的路径是~/.quant1x/a/b.yyyy-mm-dd
Click to show internal directories.
Click to hide internal directories.