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]) Check(cacheDate, featureDate string)
- func (this *Cache1D[T]) Checkout(date ...string)
- func (this *Cache1D[T]) Factory(date, securityCode string) factors.Feature
- func (this *Cache1D[T]) Get(securityCode string, date ...string) *T
- func (this *Cache1D[T]) Init(ctx context.Context, date, securityCode string) error
- func (this *Cache1D[T]) Key() string
- 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]) Owner() string
- func (this *Cache1D[T]) Print(code string, date ...string)
- func (this *Cache1D[T]) ReplaceCache()
- func (this *Cache1D[T]) Set(securityCode string, newValue T, date ...string)
- func (this *Cache1D[T]) Usage() string
- type CacheAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCacheLoader ¶
func RegisterCacheLoader(key string, loader CacheAdapter)
Types ¶
type Cache1D ¶
type Cache1D[T factors.Feature] struct { Date string // 日期 // contains filtered or unexported fields }
Cache1D 每天1个证券代码1条数据
func NewCache1D ¶
func NewCache1D[T factors.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.