plugins

package
v4.1.6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPluginNotApplicable = errors.New("plugin not applicable")

Functions

func RegisterAttrlessConditionPlannerPlugin

func RegisterAttrlessConditionPlannerPlugin(plugin AttrlessConditionPlannerPlugin)

func RegisterDatabaseRegistryPlugin

func RegisterDatabaseRegistryPlugin(plugin DatabaseRegistryPlugin)

func RegisterGetTracesQueryPlugin

func RegisterGetTracesQueryPlugin(plugin GetTracesQueryPlugin)

func RegisterInitClickhousePlannerPlugin

func RegisterInitClickhousePlannerPlugin(plugin InitClickhousePlannerPlugin)

func RegisterInitDownsamplePlannerPlugin

func RegisterInitDownsamplePlannerPlugin(plugin InitDownsamplePlannerPlugin)

func RegisterInitIndexPlannerPlugin

func RegisterInitIndexPlannerPlugin(plugin InitIndexPlannerPlugin)

func RegisterLabelsGetterPlugin

func RegisterLabelsGetterPlugin(plugin LabelsGetterPlugin)

func RegisterLogQLPlannerPlugin

func RegisterLogQLPlannerPlugin(name string, plugin LogQLTranspilerPlugin)

func RegisterMetrics15ShortcutPlannerPlugin

func RegisterMetrics15ShortcutPlannerPlugin(plugin Metrics15ShortcutPlannerPlugin)

func RegisterPreRequestPlugin

func RegisterPreRequestPlugin(name string, plugin PreRequestPlugin)

func RegisterPreWSRequestPlugin

func RegisterPreWSRequestPlugin(name string, plugin PreWSRequestPlugin)

func RegisterQueryLabelsServicePlugin

func RegisterQueryLabelsServicePlugin(plugin QueryLabelsServicePlugin)

func RegisterQueryRangeServicePlugin

func RegisterQueryRangeServicePlugin(factory QueryRangeServicePlugin)

func RegisterRoutePlugin

func RegisterRoutePlugin(name string, p IRoutePlugin)

func RegisterSeriesPlannerPlugin

func RegisterSeriesPlannerPlugin(plugin SeriesPlannerPlugin)

func RegisterSqlMainInitPlannerPlugin

func RegisterSqlMainInitPlannerPlugin(plugin SqlMainInitPlannerPlugin)

func RegisterStreamSelectPlannerPlugin

func RegisterStreamSelectPlannerPlugin(plugin StreamSelectPlannerPlugin)

func RegisterTableNamesPlugin

func RegisterTableNamesPlugin(name string, plugin TableNamesPlugin)

func RegisterTempoServicePlugin

func RegisterTempoServicePlugin(factory TempoServicePlugin)

func RegisterTimeSeriesInitPlannerPlugin

func RegisterTimeSeriesInitPlannerPlugin(plugin TimeSeriesInitPlannerPlugin)

func RegisterTracesDataPlugin

func RegisterTracesDataPlugin(plugin TracesDataPlugin)

func RegisterValuesPlannerPlugin

func RegisterValuesPlannerPlugin(plugin ValuesPlannerPlugin)

Types

type AttrlessConditionPlannerPlugin

type AttrlessConditionPlannerPlugin func() shared.SQLRequestPlanner

func GetAttrlessConditionPlannerPlugin

func GetAttrlessConditionPlannerPlugin() *AttrlessConditionPlannerPlugin

type DatabaseRegistryPlugin

type DatabaseRegistryPlugin func() model.IDBRegistry

func GetDatabaseRegistryPlugin

func GetDatabaseRegistryPlugin() *DatabaseRegistryPlugin

type GetTracesQueryPlugin

type GetTracesQueryPlugin func(ctx context.Context, idx any, limit int, fromNS int64, toNS int64,
	distributed bool, minDurationNS int64, maxDurationNS int64) (sql.ISelect, error)

func GetGetTracesQueryPlugin

func GetGetTracesQueryPlugin() *GetTracesQueryPlugin

type IRoutePlugin

type IRoutePlugin interface {
	Route(router *mux.Router)
	SetServices(services Services)
}

func GetRoutePlugins

func GetRoutePlugins() []IRoutePlugin

type InitClickhousePlannerPlugin

type InitClickhousePlannerPlugin func() shared.SQLRequestPlanner

func GetInitClickhousePlannerPlugin

func GetInitClickhousePlannerPlugin() *InitClickhousePlannerPlugin

type InitDownsamplePlannerPlugin

type InitDownsamplePlannerPlugin func() shared.SQLRequestPlanner

func GetInitDownsamplePlannerPlugin

func GetInitDownsamplePlannerPlugin() *InitDownsamplePlannerPlugin

type InitIndexPlannerPlugin

type InitIndexPlannerPlugin func() shared.SQLRequestPlanner

func GetInitIndexPlannerPlugin

func GetInitIndexPlannerPlugin() *InitIndexPlannerPlugin

type LabelsGetterPlugin

type LabelsGetterPlugin interface {
	GetLabelsQuery(ctx context.Context, conn *model.DataDatabasesMap,
		fingerprints map[uint64]bool, from time.Time, to time.Time) sql.ISelect
}

func GetLabelsGetterPlugin

func GetLabelsGetterPlugin() *LabelsGetterPlugin

type LogQLTranspilerPlugin

type LogQLTranspilerPlugin interface {
	Plan(script *logql_parser.LogQLScript) (shared.RequestProcessorChain, error)
}

func GetLogQLPlannerPlugins

func GetLogQLPlannerPlugins() []LogQLTranspilerPlugin

type Metrics15ShortcutPlannerPlugin

type Metrics15ShortcutPlannerPlugin func(fn string, duration time.Duration) shared.SQLRequestPlanner

func GetMetrics15ShortcutPlannerPlugin

func GetMetrics15ShortcutPlannerPlugin() *Metrics15ShortcutPlannerPlugin

type PreRequestPlugin

type PreRequestPlugin func(ctx context.Context, req *http.Request) (context.Context, error)

func GetPreRequestPlugins

func GetPreRequestPlugins() []PreRequestPlugin

type PreWSRequestPlugin

type PreWSRequestPlugin func(ctx context.Context, req *http.Request) (context.Context, error)

func GetPreWSRequestPlugins

func GetPreWSRequestPlugins() []PreWSRequestPlugin

type QueryLabelsServicePlugin

type QueryLabelsServicePlugin interface {
	SetServiceData(data *model.ServiceData)
	EstimateKVComplexity(ctx context.Context, conn *model.DataDatabasesMap) sql.ISelect
	Labels(ctx context.Context, startMs int64, endMs int64, labelsType uint16) (chan string, error)
}

func GetQueryLabelsServicePlugin

func GetQueryLabelsServicePlugin() *QueryLabelsServicePlugin

type QueryRangeServicePlugin

type QueryRangeServicePlugin interface {
	SetServiceData(data *model.ServiceData)
	Tail(ctx context.Context, query string) (model.IWatcher, error)
}

func GetQueryRangeServicePlugin

func GetQueryRangeServicePlugin() *QueryRangeServicePlugin

type SeriesPlannerPlugin

type SeriesPlannerPlugin func(main shared.SQLRequestPlanner) shared.SQLRequestPlanner

func GetSeriesPlannerPlugin

func GetSeriesPlannerPlugin() *SeriesPlannerPlugin

type Services

type Services struct {
	TempoService       model.ITempoService
	QueryLabelsService model.IQueryLabelsService
	PrometheusService  storage.Queryable
	QueryRangeService  model.IQueryRangeService
	ServiceData        model.ServiceData
}

type SqlMainInitPlannerPlugin

type SqlMainInitPlannerPlugin func() shared.SQLRequestPlanner

func GetSqlMainInitPlannerPlugin

func GetSqlMainInitPlannerPlugin() *SqlMainInitPlannerPlugin

type StreamSelectPlannerPlugin

type StreamSelectPlannerPlugin func(LabelNames []string, ops []string, values []string) shared.SQLRequestPlanner

func GetStreamSelectPlannerPlugin

func GetStreamSelectPlannerPlugin() *StreamSelectPlannerPlugin

type TableNamesPlugin

type TableNamesPlugin func() map[string]string

func GetTableNamesPlugin

func GetTableNamesPlugin() *TableNamesPlugin

type TempoServicePlugin

type TempoServicePlugin interface {
	GetQueryRequest(ctx context.Context, startNS int64, endNS int64, traceId []byte,
		conn *model.DataDatabasesMap) sql.ISelect
	GetTagsQuery(ctx context.Context, conn *model.DataDatabasesMap) sql.ISelect
	GetValuesQuery(ctx context.Context, tag string, conn *model.DataDatabasesMap) sql.ISelect
}

func GetTempoServicePlugin

func GetTempoServicePlugin() *TempoServicePlugin

type TimeSeriesInitPlannerPlugin

type TimeSeriesInitPlannerPlugin func() shared.SQLRequestPlanner

func GetTimeSeriesInitPlannerPlugin

func GetTimeSeriesInitPlannerPlugin() *TimeSeriesInitPlannerPlugin

type TracesDataPlugin

type TracesDataPlugin func(main shared.SQLRequestPlanner) shared.SQLRequestPlanner

func GetTracesDataPlugin

func GetTracesDataPlugin() *TracesDataPlugin

type ValuesPlannerPlugin

type ValuesPlannerPlugin func(main shared.SQLRequestPlanner, key string) shared.SQLRequestPlanner

func GetValuesPlannerPlugin

func GetValuesPlannerPlugin() *ValuesPlannerPlugin

Jump to

Keyboard shortcuts

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