Documentation ¶
Index ¶
- type MemDb
- func (memDb *MemDb) GetManifest() *pb.Manifest
- func (memDb *MemDb) GetStatVars(places []string) ([]string, []string)
- func (memDb *MemDb) HasStatVar(statVar string) bool
- func (memDb *MemDb) IsEmpty() bool
- func (memDb *MemDb) LoadFromGcs(ctx context.Context, bucket, prefix string) error
- func (memDb *MemDb) ReadPointValue(statVar, place, date string) (*pb.PointStat, *pb.StatMetadata)
- func (memDb *MemDb) ReadSeries(statVar, place string) []*pb.Series
- func (memDb *MemDb) SubscribeGcsUpdate(ctx context.Context, pubsubProject, pubsubTopic, subscriberPrefix string, ...) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemDb ¶ added in v1.24.0
type MemDb struct {
// contains filtered or unexported fields
}
MemDb holds imported data in memory.
func (*MemDb) GetManifest ¶ added in v1.24.0
GetManifest get the manifest data.
func (*MemDb) GetStatVars ¶ added in v1.24.0
GetStatVars retrieves the stat vars from private import that have data for the given places.
func (*MemDb) HasStatVar ¶ added in v1.24.0
HasStatVar checks if a stat var exists in the memory database.
func (*MemDb) LoadFromGcs ¶ added in v1.24.0
LoadFromGcs loads tmcf + csv files into memory database
func (*MemDb) ReadPointValue ¶ added in v1.24.0
func (memDb *MemDb) ReadPointValue(statVar, place, date string) ( *pb.PointStat, *pb.StatMetadata, )
ReadPointValue reads one observation point. If date is "", the latest observation is returned, otherwise, the observation corresponding to the given date is returned.
func (*MemDb) ReadSeries ¶ added in v1.24.0
ReadSeries reads stat series from in-memory DB.
type Store ¶
type Store struct { BqClient *bigquery.Client MemDb *MemDb // contains filtered or unexported fields }
Store holds the handlers to BigQuery and Bigtable
func NewStore ¶
func NewStore( bqClient *bigquery.Client, memDb *MemDb, baseTable *bigtable.Table, branchTable *bigtable.Table) *Store
NewStore creates a new store.
func (*Store) UpdateBranchBt ¶
UpdateBranchBt updates the branch bigtable
Click to show internal directories.
Click to hide internal directories.