Documentation
¶
Index ¶
- Variables
- func DeleteCubes(clickhouse clickhouse.Clickhouse, cubes Cubes) error
- func PrintDimensions(metricsFilter []string, prometheusUrl string)
- func PrintMetrics(dimensionFilter []string, prometheusUrl string)
- func ValueHelp(metric, dimension, prometheusUrl string) error
- func WatchCubes(clickhouse clickhouse.Clickhouse, cubes Cubes, prometheusUrl string)
- type Column
- type Cube
- type Cubes
- type Metric
- type Platon
- func (p *Platon) CreateTable(table Table) error
- func (p *Platon) EnsureColumns(table Table) error
- func (p *Platon) EnsureTable(table Table) error
- func (p *Platon) GetMetrics(metricsFilter ...string) ([]Metric, error)
- func (p *Platon) GetSamples(metric string, start, end time.Time) (model.Value, error)
- func (p *Platon) InsertData(table Table) error
- func (p *Platon) TableExists(table Table) (bool, error)
- func (p *Platon) UpdateCube(cube Cube)
- type Query
- type Row
- type Table
- func (t *Table) CountMatches(dimensions []string, otherRow *Row) (count uint64, err error)
- func (t Table) GetColumns() []Column
- func (t *Table) GetDimension(dimension string) string
- func (t *Table) GetFirstMatchingRow(dimensions []string, otherRow *Row) (*Row, error)
- func (t *Table) GetMetric(metric string) string
- func (t Table) GetQuotedColumnNames() []string
- func (t *Table) InsertRow(rowInput *Row)
- func (t *Table) PrettyPrint(limit int)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRange time.Duration = 1 * time.Hour
Functions ¶
func DeleteCubes ¶
func DeleteCubes(clickhouse clickhouse.Clickhouse, cubes Cubes) error
func PrintDimensions ¶
func PrintMetrics ¶
func WatchCubes ¶
func WatchCubes(clickhouse clickhouse.Clickhouse, cubes Cubes, prometheusUrl string)
Types ¶
type Cube ¶
type Cube struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Ttl time.Duration `yaml:"ttl"`
ScrapeInterval time.Duration `yaml:"scrape-interval"`
Queries []Query `yaml:"queries"`
JoinedLabels []string `yaml:"joined-labels"`
LastUpdate time.Time
}
func (*Cube) GetAggregation ¶
func (*Cube) GetMetricColumns ¶
type Platon ¶
type Platon struct {
Cubes Cubes
Database clickhouse.Clickhouse
StartTime time.Time
EndTime time.Time
Client api.Client
PrometheusUrl string
// contains filtered or unexported fields
}
func (*Platon) CreateTable ¶
func (*Platon) EnsureColumns ¶
func (*Platon) EnsureTable ¶
func (*Platon) GetSamples ¶
func (*Platon) InsertData ¶
func (*Platon) UpdateCube ¶
type Row ¶
func (Row) GetOrderedValues ¶
type Table ¶
func (*Table) CountMatches ¶
func (Table) GetColumns ¶
func (*Table) GetDimension ¶
func (*Table) GetFirstMatchingRow ¶
func (Table) GetQuotedColumnNames ¶
func (*Table) PrettyPrint ¶
Click to show internal directories.
Click to hide internal directories.