Documentation ¶
Index ¶
- Constants
- func NewStore(d *sql.DB) domain.Store
- type DataPoint
- type Metric
- type MetricTags
- type Store
- func (s *Store) CreateMetric(m domain.Metric) error
- func (s *Store) DeleteMetric(name string) error
- func (s *Store) GetDataSet(dq domain.DataQuery) ([]domain.DataSet, error)
- func (s *Store) GetMetric(name string) (domain.Metric, error)
- func (s *Store) SaveDataSet(ds domain.DataSet) error
- func (s *Store) UpdateMetric(m domain.Metric) error
Constants ¶
View Source
const CREATE_SCHEMA_SQL = `` /* 1459-byte string literal not displayed */
View Source
const INSERT_DATA_STMT = `INSERT INTO data (time, metric, value, tags) VALUES (?, ?, ?, ?)`
View Source
const INSERT_METRIC_STMT = `INSERT INTO meta(name,desc) VALUES(?,?)`
View Source
const INSERT_TAG_STMT = `INSERT OR IGNORE INTO tags(metric,tag) VALUES(?,?)`
View Source
const SELECT_METRIC_STMT = `SELECT * FROM meta WHERE name = ? LIMIT 1`
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MetricTags ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteMetric ¶
func (*Store) GetDataSet ¶
Click to show internal directories.
Click to hide internal directories.