prom

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterLabelsDropAll added in v1.12.0

func FilterLabelsDropAll(name string) bool

func FilterLabelsKeepAll added in v1.12.0

func FilterLabelsKeepAll(name string) bool

Types

type ClickHouse added in v1.16.0

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

func (*ClickHouse) Close added in v1.16.0

func (c *ClickHouse) Close()

func (*ClickHouse) GetStep added in v1.16.0

func (c *ClickHouse) GetStep(from, to timeseries.Time) (timeseries.Duration, error)

func (*ClickHouse) LabelValues added in v1.16.0

func (c *ClickHouse) LabelValues(r *http.Request, w http.ResponseWriter, labelName string)

func (*ClickHouse) MetricMetadata added in v1.16.0

func (c *ClickHouse) MetricMetadata(r *http.Request, w http.ResponseWriter)

func (*ClickHouse) Ping added in v1.16.0

func (c *ClickHouse) Ping(ctx context.Context) error

func (*ClickHouse) Querier added in v1.16.0

func (c *ClickHouse) Querier(mint, maxt int64) (storage.Querier, error)

func (*ClickHouse) QueryRange added in v1.16.0

func (c *ClickHouse) QueryRange(ctx context.Context, query string, filterLabels FilterLabelsF, from, to timeseries.Time, step timeseries.Duration) ([]*model.MetricValues, error)

func (*ClickHouse) Series added in v1.16.0

func (c *ClickHouse) Series(r *http.Request, w http.ResponseWriter)

type Client

type Client interface {
	Ping(ctx context.Context) error
	GetStep(from, to timeseries.Time) (timeseries.Duration, error)
	QueryRange(ctx context.Context, query string, filterLabels FilterLabelsF, from, to timeseries.Time, step timeseries.Duration) ([]*model.MetricValues, error)
	MetricMetadata(r *http.Request, w http.ResponseWriter)
	LabelValues(r *http.Request, w http.ResponseWriter, labelName string)
	Series(r *http.Request, w http.ResponseWriter)
	Close()
}

func NewClient

func NewClient(promConfig *db.IntegrationPrometheus, clickhouseConfig *db.IntegrationClickhouse) (Client, error)

type FilterLabelsF added in v1.12.0

type FilterLabelsF func(name string) bool

type HttpClient added in v1.16.0

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

func (*HttpClient) Close added in v1.16.0

func (c *HttpClient) Close()

func (*HttpClient) GetStep added in v1.16.0

func (c *HttpClient) GetStep(from, to timeseries.Time) (timeseries.Duration, error)

func (*HttpClient) LabelValues added in v1.16.0

func (c *HttpClient) LabelValues(r *http.Request, w http.ResponseWriter, labelName string)

func (*HttpClient) MetricMetadata added in v1.16.0

func (c *HttpClient) MetricMetadata(r *http.Request, w http.ResponseWriter)

func (*HttpClient) Ping added in v1.16.0

func (c *HttpClient) Ping(ctx context.Context) error

func (*HttpClient) QueryRange added in v1.16.0

func (c *HttpClient) QueryRange(ctx context.Context, query string, filterLabels FilterLabelsF, from, to timeseries.Time, step timeseries.Duration) ([]*model.MetricValues, error)

func (*HttpClient) Series added in v1.16.0

func (c *HttpClient) Series(r *http.Request, w http.ResponseWriter)

type PrometheusResponse added in v1.16.0

type PrometheusResponse struct {
	Status    string      `json:"status"`
	Data      interface{} `json:"data,omitempty"`
	ErrorType errorType   `json:"errorType,omitempty"`
	Error     string      `json:"error,omitempty"`
	Warnings  []string    `json:"warnings,omitempty"`
	Infos     []string    `json:"infos,omitempty"`
}

Jump to

Keyboard shortcuts

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