query

package
v0.0.0-...-b68b228 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 55 Imported by: 0

Documentation

Overview

Package query api query

Package query for query

Index

Constants

View Source
const (
	// LabelMatcherParam labelMatch
	LabelMatcherParam = "labelMatch[]"
)

Variables

View Source
var ErrNotImplement = errors.New("api not implement")

ErrNotImplement xxx

Functions

func NewQueryEngine

func NewQueryEngine(reg *prometheus.Registry, logKit blog.GlogKit) func(int64) *promql.Engine

NewQueryEngine xxx

func NewQueryableCreator

func NewQueryableCreator(reg *prometheus.Registry, logKit blog.GlogKit,
	discoveryClient *DiscoveryClient) query.QueryableCreator

NewQueryableCreator xxx

Types

type DiscoveryClient

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

DiscoveryClient 支持的服务发现, 包含静态配置, http-sd, 命令行和配置文件来源

func NewDiscoveryClient

func NewDiscoveryClient(ctx context.Context, reg *prometheus.Registry, tracer opentracing.Tracer,
	logKit blog.GlogKit, strictStoreList []string, storeList []string, httpSDURLs []string,
	g *run.Group) (*DiscoveryClient, error)

NewDiscoveryClient xxx

func (*DiscoveryClient) Addresses

func (c *DiscoveryClient) Addresses() []string

Addresses 服务发现所有地址

func (*DiscoveryClient) Endpoints

func (c *DiscoveryClient) Endpoints() *query.EndpointSet

Endpoints 返回 EndpointSet

func (*DiscoveryClient) ForceRefreshEndpoints

func (c *DiscoveryClient) ForceRefreshEndpoints(ctx context.Context)

ForceRefreshEndpoints xxx

type EmptyExemplarClient

type EmptyExemplarClient struct{}

EmptyExemplarClient empty exemplar client

func NewEmptyExemplarClient

func NewEmptyExemplarClient() *EmptyExemplarClient

NewEmptyExemplarClient :

func (*EmptyExemplarClient) Exemplars

Exemplars :

type EmptyMetadataClient

type EmptyMetadataClient struct{}

EmptyMetadataClient empty metadata client

func NewEmptyMetaDataClient

func NewEmptyMetaDataClient() *EmptyMetadataClient

NewEmptyMetaDataClient xxx

func (*EmptyMetadataClient) MetricMetadata

MetricMetadata :

type EmptyRuleClient

type EmptyRuleClient struct{}

EmptyRuleClient empty rule client

func NewEmptyRuleClient

func NewEmptyRuleClient() *EmptyRuleClient

NewEmptyRuleClient :

func (*EmptyRuleClient) Rules

Rules :

type EmptyTargetClient

type EmptyTargetClient struct{}

EmptyTargetClient empty target client

func NewEmptyTargetClient

func NewEmptyTargetClient() *EmptyTargetClient

NewEmptyTargetClient :

func (*EmptyTargetClient) Targets

Targets :

type HTTPSDClient

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

HTTPSDClient http sd client

func NewHTTPSDClient

func NewHTTPSDClient(
	ctx context.Context, logKit blog.GlogKit, conf httpdiscovery.SDConfig, addr string, u url.URL,
	forceRefreshFunc func(ctx context.Context)) (*HTTPSDClient, error)

NewHTTPSDClient xxx

func (*HTTPSDClient) Close

func (c *HTTPSDClient) Close()

Close xxx

func (*HTTPSDClient) Run

func (c *HTTPSDClient) Run() error

Run xxx

type HTTPSDClientGroup

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

HTTPSDClientGroup http sd client group

func NewHTTPSDClientGroup

func NewHTTPSDClientGroup(ctx context.Context, logKit blog.GlogKit, reg *prometheus.Registry,
	conf *httpdiscovery.SDConfig, g *run.Group, forceRefreshFunc func(ctx context.Context)) (*HTTPSDClientGroup, error)

NewHTTPSDClientGroup xxx

func (*HTTPSDClientGroup) Addresses

func (c *HTTPSDClientGroup) Addresses() []string

Addresses xxx

type QueryAPI

type QueryAPI struct {
	StoresList []string
	// contains filtered or unexported fields
}

QueryAPI promql api 服务, 封装 thaons 的API使用

func NewQueryAPI

func NewQueryAPI(ctx context.Context, reg *prometheus.Registry, tracer opentracing.Tracer, logKit blog.GlogKit,
	httpAddr string, httpPort string, addrIPv6 string, strictStoreList []string, storeList []string,
	httpSDURLs []string, g *run.Group,
) (*QueryAPI, error)

NewQueryAPI 这个包对thanos的query做一些封装,重新调用等 使用配置文件配置 启动 query 模块,暴露http query模块对应我们的store

func (*QueryAPI) Close

func (a *QueryAPI) Close(err error)

Close 停止服务

func (*QueryAPI) Run

func (a *QueryAPI) Run() error

Run 启动服务

type TenantAuthMiddleware

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

TenantAuthMiddleware tenant auth middleware

func NewTenantAuthMiddleware

func NewTenantAuthMiddleware(ctx context.Context, ins extpromhttp.InstrumentationMiddleware) (*TenantAuthMiddleware,
	error)

NewTenantAuthMiddleware 租户鉴权中间件

func (*TenantAuthMiddleware) NewHandler

func (t *TenantAuthMiddleware) NewHandler(handlerName string, handler http.Handler) http.HandlerFunc

NewHandler 处理函数

Jump to

Keyboard shortcuts

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