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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemDb ¶
type MemDb struct {
// contains filtered or unexported fields
}
MemDb holds imported data in memory.
func (*MemDb) GetManifest ¶
GetManifest get the manifest data.
func (*MemDb) GetStatVars ¶
GetStatVars retrieves the stat vars from private import that have data for the given places.
func (*MemDb) HasStatVar ¶
HasStatVar checks if a stat var exists in the memory database.
func (*MemDb) LoadFromGcs ¶
LoadFromGcs loads tmcf + csv files into memory database
func (*MemDb) ReadPointValue ¶
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 ¶
ReadSeries reads stat series from in-memory DB.
Click to show internal directories.
Click to hide internal directories.