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) Metadata ¶
func (rr *GRPCClient) Metadata(ctx context.Context, req *metadatapb.MetadataRequest) (map[string][]metadatapb.Meta, storage.Warnings, error)
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
Prometheus implements metadatapb.Metadata gRPC 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) Metadata ¶
func (p *Prometheus) Metadata(r *metadatapb.MetadataRequest, s metadatapb.Metadata_MetadataServer) error
Metadata 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) Metadata ¶
func (s *Proxy) Metadata(req *metadatapb.MetadataRequest, srv metadatapb.Metadata_MetadataServer) error
type UnaryClient ¶
type UnaryClient interface {
Metadata(ctx context.Context, req *metadatapb.MetadataRequest) (map[string][]metadatapb.Meta, storage.Warnings, error)
}
UnaryClient is gRPC metadatapb.Metadata client which expands streaming metadata API. Useful for consumers that does not support streaming.