Documentation
¶
Index ¶
- type TimescaleDB
- func (m *TimescaleDB) Close(ctx context.Context)
- func (m *TimescaleDB) Migrate(ctx context.Context) error
- func (m *TimescaleDB) Read(ctx context.Context, filter *deer.ReadFilter) ([]*deer.Metric, error)
- func (m *TimescaleDB) Save(ctx context.Context, result *deer.CheckResult)
- func (m *TimescaleDB) Truncate(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimescaleDB ¶
type TimescaleDB struct {
// contains filtered or unexported fields
}
TimescaleDB store impl.
func NewTimescaleDB ¶
func NewTimescaleDB(ctx context.Context, connURI string) (*TimescaleDB, error)
NewTimescaleDB creates new timescale db store.
func (*TimescaleDB) Close ¶
func (m *TimescaleDB) Close(ctx context.Context)
Close closes connection to pg.
func (*TimescaleDB) Migrate ¶
func (m *TimescaleDB) Migrate(ctx context.Context) error
Migrate creates metrics table and initialize prepared statements.
func (*TimescaleDB) Read ¶
func (m *TimescaleDB) Read(ctx context.Context, filter *deer.ReadFilter) ([]*deer.Metric, error)
Read fetches metrics from database based on filter.
func (*TimescaleDB) Save ¶
func (m *TimescaleDB) Save(ctx context.Context, result *deer.CheckResult)
Save inserts metrics to database.
Click to show internal directories.
Click to hide internal directories.