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, storage.Warnings, error)
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 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.