Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMetadataServer ¶
func RegisterMetadataServer(metadataSrv metadatapb.MetadataServer) func(*grpc.Server)
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient allows to retrieve metadata from local gRPC streaming server implementation. TODO(bwplotka): Switch to native gRPC transparent client->server adapter once available.
func NewGRPCClient ¶
func NewGRPCClient(ts metadatapb.MetadataServer) *GRPCClient
func (*GRPCClient) MetricMetadata ¶
func (rr *GRPCClient) MetricMetadata(ctx context.Context, req *metadatapb.MetricMetadataRequest) (map[string][]metadatapb.Meta, annotations.Annotations, error)
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
Prometheus implements metadatapb.Metadata gRPC service that allows to fetch metric metadata from Prometheus HTTP /api/v1/metadata endpoint.
func NewPrometheus ¶
func NewPrometheus(base *url.URL, client *promclient.Client) *Prometheus
NewPrometheus creates a new metadata.Prometheus.
func (*Prometheus) MetricMetadata ¶
func (p *Prometheus) MetricMetadata(r *metadatapb.MetricMetadataRequest, s metadatapb.Metadata_MetricMetadataServer) error
MetricMetadata returns all specified metric metadata from Prometheus.
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy implements metadatapb.Metadata gRPC that fanouts requests to given metadatapb.Metadata and deduplication on the way.
func NewProxy ¶
func NewProxy(logger log.Logger, metadata func() []metadatapb.MetadataClient) *Proxy
NewProxy returns a new metadata.Proxy.
func (*Proxy) MetricMetadata ¶
func (s *Proxy) MetricMetadata(req *metadatapb.MetricMetadataRequest, srv metadatapb.Metadata_MetricMetadataServer) error
type UnaryClient ¶
type UnaryClient interface {
MetricMetadata(ctx context.Context, req *metadatapb.MetricMetadataRequest) (map[string][]metadatapb.Meta, annotations.Annotations, error)
}
UnaryClient is a gRPC metadatapb.Metadata client which expands streaming metadata API. Useful for consumers that does not support streaming.