Documentation ¶
Overview ¶
Package database implements functions to store information in Cloud Spanner databases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDatabase ¶
LoadDatabase sets up clients with already existing database in Cloud Spanner.
Types ¶
type DBMetrics ¶
type DBMetrics struct { SpannerDuration map[string]prometheus.Histogram SpannerErrors map[string]prometheus.Counter Samples map[string]prometheus.Summary }
DBMetrics stores prometheus metrics to record data about the database. SpannerDuration and SpannerError metrics should be stored as "write" and "read" in the maps.
type Database ¶
type Database interface { Write(ctx context.Context, ts *TimeSeries) error Read(ctx context.Context, queries []*prompb.Query) (*prompb.ReadResponse, error) Close() }
Database interface for the external functions of truestreet.
type Sample ¶
type Sample struct { TSID model.Fingerprint Timestamp model.Time Value model.SampleValue }
Sample struct stores a single sample with the TSID identifier rather than the metric map.
type TimeSeries ¶
TimeSeries struct for storing protobuf timeSeries data using prometheus model structs.
Click to show internal directories.
Click to hide internal directories.