exemplars

package
v0.32.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterExemplarsServer

func RegisterExemplarsServer(exemplarsSrv exemplarspb.ExemplarsServer) func(*grpc.Server)

RegisterExemplarsServer register exemplars server.

Types

type GRPCClient

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

GRPCClient allows to retrieve exemplars from local gRPC streaming server implementation. TODO(bwplotka): Switch to native gRPC transparent client->server adapter once available.

func NewGRPCClient

func NewGRPCClient(es exemplarspb.ExemplarsServer) *GRPCClient

func NewGRPCClientWithDedup

func NewGRPCClientWithDedup(es exemplarspb.ExemplarsServer, replicaLabels []string) *GRPCClient

func (*GRPCClient) Exemplars

type MultiTSDB added in v0.22.0

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

MultiTSDB implements exemplarspb.ExemplarsServer that allows to fetch exemplars a MultiTSDB instance.

func NewMultiTSDB added in v0.22.0

func NewMultiTSDB(tsdbExemplarsServers func() map[string]*TSDB) *MultiTSDB

NewMultiTSDB creates new exemplars.MultiTSDB.

func (*MultiTSDB) Exemplars added in v0.22.0

Exemplars returns all specified exemplars from a MultiTSDB instance.

type Prometheus

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

Prometheus implements exemplarspb.Exemplars gRPC that allows to fetch exemplars from Prometheus.

func NewPrometheus

func NewPrometheus(base *url.URL, client *promclient.Client, extLabels func() labels.Labels) *Prometheus

NewPrometheus creates new exemplars.Prometheus.

func (*Prometheus) Exemplars

Exemplars returns all specified exemplars from Prometheus.

type Proxy

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

Proxy implements exemplarspb.Exemplars gRPC that fanouts requests to given exemplarspb.Exemplars.

func NewProxy

func NewProxy(logger log.Logger, exemplars func() []*exemplarspb.ExemplarStore, selectorLabels labels.Labels) *Proxy

NewProxy return new exemplars.Proxy.

type TSDB added in v0.22.0

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

TSDB allows fetching exemplars from a TSDB instance.

func NewTSDB added in v0.22.0

func NewTSDB(db storage.ExemplarQueryable, extLabels labels.Labels) *TSDB

NewTSDB creates new exemplars.TSDB.

func (*TSDB) Exemplars added in v0.22.0

func (t *TSDB) Exemplars(matchers [][]*labels.Matcher, start, end int64, s exemplarspb.Exemplars_ExemplarsServer) error

Exemplars returns all specified exemplars from a TSDB instance.

func (*TSDB) SetExtLabels added in v0.32.0

func (t *TSDB) SetExtLabels(extLabels labels.Labels)

type UnaryClient

type UnaryClient interface {
	Exemplars(ctx context.Context, req *exemplarspb.ExemplarsRequest) ([]*exemplarspb.ExemplarData, storage.Warnings, error)
}

UnaryClient is gRPC exemplarspb.Exemplars client which expands streaming exemplars API. Useful for consumers that does not support streaming.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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