github.com/thanos-io/thanos@v0.32.5/pkg/metadata/metadatapb/rpc.proto (about) 1 // Copyright (c) The Thanos Authors. 2 // Licensed under the Apache License 2.0. 3 4 syntax = "proto3"; 5 package thanos; 6 7 import "store/storepb/types.proto"; 8 import "gogoproto/gogo.proto"; 9 10 option go_package = "metadatapb"; 11 12 option (gogoproto.sizer_all) = true; 13 option (gogoproto.marshaler_all) = true; 14 option (gogoproto.unmarshaler_all) = true; 15 option (gogoproto.goproto_getters_all) = false; 16 17 // Do not generate XXX fields to reduce memory footprint and opening a door 18 // for zero-copy casts to/from prometheus data types. 19 option (gogoproto.goproto_unkeyed_all) = false; 20 option (gogoproto.goproto_unrecognized_all) = false; 21 option (gogoproto.goproto_sizecache_all) = false; 22 23 service Metadata { 24 rpc MetricMetadata(MetricMetadataRequest) returns (stream MetricMetadataResponse); 25 } 26 27 message MetricMetadataRequest { 28 string metric = 1; 29 int32 limit = 2; 30 PartialResponseStrategy partial_response_strategy = 3; 31 } 32 33 message MetricMetadataResponse { 34 oneof result { 35 /// A collection of metric metadata entries. 36 MetricMetadata metadata = 1; 37 38 /// warning is considered an information piece in place of series for warning purposes. 39 /// It is used to warn metadata API users about suspicious cases or partial response (if enabled). 40 string warning = 2; 41 } 42 } 43 44 message MetricMetadata { 45 map<string, MetricMetadataEntry> metadata = 1 [(gogoproto.nullable) = false]; 46 } 47 48 message MetricMetadataEntry { 49 repeated Meta metas = 2 [(gogoproto.nullable) = false]; 50 } 51 52 message Meta { 53 string type = 1 [(gogoproto.jsontag) = "type"]; 54 string help = 2 [(gogoproto.jsontag) = "help"]; 55 string unit = 3 [(gogoproto.jsontag) = "unit"]; 56 }