insight

package
v1.29.8 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectMetricData

func CollectMetricData(agg interface{}, timeBeforeGroup bool) ([]insight.MetricData, string)

func GenerateQuery

func GenerateQuery(metric *insight.Metric) (interface{}, error)

func InitAPI

func InitAPI()

Types

type FieldsMetadata

type FieldsMetadata struct {
	Aggregatable map[string]elastic.ElasticField
	Dates        map[string]elastic.ElasticField
}

type Function added in v1.28.2

type Function interface {
	//GenerateAggregation generates aggregation for specify function, e.g. rate, latency ...
	//
	// metricName: The name of the metric to be calculated (used as an identifier in the aggregation).
	GenerateAggregation(metricName string) (map[string]interface{}, error)
}

type InsightAPI

type InsightAPI struct {
	core.Handler
}

func (*InsightAPI) HandleGetMetadata

func (h *InsightAPI) HandleGetMetadata(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (*InsightAPI) HandleGetMetricData

func (h *InsightAPI) HandleGetMetricData(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (*InsightAPI) HandleGetPreview

func (h *InsightAPI) HandleGetPreview(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

type RenderTemplateContext

type RenderTemplateContext struct {
	Key   string                 `json:"key"`
	Value map[string]interface{} `json:"value"`
}

type RenderTemplateRequest

type RenderTemplateRequest struct {
	Contexts []RenderTemplateContext `json:"contexts"`
	Template string                  `json:"template"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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