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 ¶
func (rr *GRPCClient) Exemplars(ctx context.Context, req *exemplarspb.ExemplarsRequest) ([]*exemplarspb.ExemplarData, annotations.Annotations, error)
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
NewMultiTSDB creates new exemplars.MultiTSDB.
func (*MultiTSDB) Exemplars ¶ added in v0.22.0
func (m *MultiTSDB) Exemplars(r *exemplarspb.ExemplarsRequest, s exemplarspb.Exemplars_ExemplarsServer) error
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 ¶
func (p *Prometheus) Exemplars(r *exemplarspb.ExemplarsRequest, s exemplarspb.Exemplars_ExemplarsServer) error
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.
func (*Proxy) Exemplars ¶
func (s *Proxy) Exemplars(req *exemplarspb.ExemplarsRequest, srv exemplarspb.Exemplars_ExemplarsServer) error
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
type UnaryClient ¶
type UnaryClient interface {
Exemplars(ctx context.Context, req *exemplarspb.ExemplarsRequest) ([]*exemplarspb.ExemplarData, annotations.Annotations, error)
}
UnaryClient is gRPC exemplarspb.Exemplars client which expands streaming exemplars API. Useful for consumers that does not support streaming.