package trading import ( "sig-pub/api/pb" vmts "sig-pub/pkg/storage/tsdb/victoria_metrics" "sig-pub/pkg/types" "sig-pub/pkg/utils/collect" ) type KlineStore struct { vmdb vmts.VictoriaMetricsTSDB store [3]*collect.ConcurrentMap[string, collect.ConcurrentMap[types.Interval, *KlineSeries]] // K线列表: []exchange } func NewKlineSeriesStore(vmdb vmts.VictoriaMetricsTSDB) (kss *KlineStore) { kss = &KlineStore{ vmdb: vmdb, } kss.store[pb.ExchangeType_OKX] = collect.NewConcurrentMap[string, collect.ConcurrentMap[types.Interval, *KlineSeries]](64, func(s string) string { return s }) // kss.klines[pb.ExchangeType_BINANCE] = return } func (s *KlineStore) Update(exchange pb.ExchangeType, kline *types.Kline) (k types.Kline) { return }