platon

package
v0.0.0-...-6ef5942 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructURL

func ConstructURL(address string, port string, ssl bool) string

ConstructURL builds a URL and returns it as string

func FillColumnHeads

func FillColumnHeads(queryResults []model.Value) (labelNames, metricNames []string)

func GetMetrics

func GetMetrics(client api.Client, startTime time.Time, endTime time.Time) (model.LabelValues, error)

func GetPromClient

func GetPromClient() (api.Client, error)

func GetQueryTimes

func GetQueryTimes() (time.Time, time.Time)

GetQueryTimes sets startTime to now and endTime one hour in the past

func GetSamples

func GetSamples(client api.Client, metric string, startTime time.Time, endTime time.Time) (model.Value, error)

func MetricsToTable

func MetricsToTable(queryResults []model.Value, cube Cube, database *frostdb.DB) error

Types

type Cube

type Cube struct {
	Name        string
	Description string
	LastRefresh string
	Labels      []string
	Metrics     []string
}

type Entry

type Entry struct {
	Labels  map[string]string
	Metrics map[string]float64
	Time    int64
}

func NewEntry

func NewEntry(time int64) *Entry

type Platon

type Platon struct {
	// contains filtered or unexported fields
}

func LoadCubes

func LoadCubes(cubes []Cube) Platon

func (*Platon) Close

func (p *Platon) Close()

func (*Platon) GetQueryEngine

func (p *Platon) GetQueryEngine() *query.LocalEngine

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL