promproxy

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package promproxy provides Prometheus proxy for observability and research.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implement proxy server.

func NewServer

func NewServer(api *promapi.Client) *Server

NewServer initializes new proxy Server from openapi client.

func (*Server) GetLabelValues

GetLabelValues implements getLabelValues operation. GET /api/v1/label/{label}/values

func (*Server) GetLabels

func (s *Server) GetLabels(ctx context.Context, params promapi.GetLabelsParams) (*promapi.LabelsResponse, error)

GetLabels implements getLabels operation.

GET /api/v1/labels

func (*Server) GetMetadata

func (s *Server) GetMetadata(ctx context.Context, params promapi.GetMetadataParams) (*promapi.MetadataResponse, error)

GetMetadata implements getMetadata operation.

GET /api/v1/metadata

func (*Server) GetQuery

func (s *Server) GetQuery(ctx context.Context, params promapi.GetQueryParams) (*promapi.QueryResponse, error)

GetQuery implements getQuery operation.

Query Prometheus.

GET /api/v1/query

func (*Server) GetQueryExemplars

GetQueryExemplars implements getQueryExemplars operation.

Query Prometheus.

GET /api/v1/query_examplars

func (*Server) GetQueryRange

func (s *Server) GetQueryRange(ctx context.Context, params promapi.GetQueryRangeParams) (*promapi.QueryResponse, error)

GetQueryRange implements getQueryRange operation.

Query Prometheus.

GET /api/v1/query_range

func (*Server) GetRules

func (s *Server) GetRules(ctx context.Context, params promapi.GetRulesParams) (*promapi.RulesResponse, error)

GetRules implements getRules operation.

GET /api/v1/rules

func (*Server) GetSeries

func (s *Server) GetSeries(ctx context.Context, params promapi.GetSeriesParams) (*promapi.SeriesResponse, error)

GetSeries implements getSeries operation. Query Prometheus.

GET /api/v1/series

func (Server) NewError

func (s Server) NewError(ctx context.Context, err error) *promapi.FailStatusCode

NewError creates *FailStatusCode from error returned by handler.

Used for common default response.

func (*Server) PostLabels

func (s *Server) PostLabels(ctx context.Context, req *promapi.LabelsForm) (*promapi.LabelsResponse, error)

PostLabels implements postLabels operation.

POST /api/v1/labels

func (*Server) PostQuery

func (s *Server) PostQuery(ctx context.Context, req *promapi.QueryForm) (*promapi.QueryResponse, error)

PostQuery implements postQuery operation.

Query Prometheus.

POST /api/v1/query

func (*Server) PostQueryExemplars

func (s *Server) PostQueryExemplars(ctx context.Context, req *promapi.ExemplarsForm) (*promapi.QueryExemplarsResponse, error)

PostQueryExemplars implements postQueryExemplars operation.

Query Prometheus.

POST /api/v1/query_examplars

func (*Server) PostQueryRange

func (s *Server) PostQueryRange(ctx context.Context, req *promapi.QueryRangeForm) (*promapi.QueryResponse, error)

PostQueryRange implements postQueryRange operation.

Query Prometheus.

POST /api/v1/query_range

func (*Server) PostSeries

func (s *Server) PostSeries(ctx context.Context, req *promapi.SeriesForm) (*promapi.SeriesResponse, error)

PostSeries implements postSeries operation.

Query Prometheus.

POST /api/v1/series

Jump to

Keyboard shortcuts

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