Help us shape the future of Go! Take the 2026 Go Developer Survey

exemplars

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

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

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

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

func NewMultiTSDB

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

NewMultiTSDB creates new exemplars.MultiTSDB.

func (*MultiTSDB) Exemplars

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

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

TSDB allows fetching exemplars from a TSDB instance.

func NewTSDB

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

NewTSDB creates new exemplars.TSDB.

func (*TSDB) Exemplars

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

Exemplars returns all specified exemplars from a TSDB instance.

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