github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/querier/queryrange/queryrange.proto (about) 1 syntax = "proto3"; 2 3 package queryrange; 4 5 option go_package = "queryrange"; 6 7 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 8 import "google/protobuf/duration.proto"; 9 import "github.com/cortexproject/cortex/pkg/cortexpb/cortex.proto"; 10 import "google/protobuf/any.proto"; 11 12 option (gogoproto.marshaler_all) = true; 13 option (gogoproto.unmarshaler_all) = true; 14 15 message PrometheusRequest { 16 string path = 1; 17 int64 start = 2; 18 int64 end = 3; 19 int64 step = 4; 20 google.protobuf.Duration timeout = 5 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; 21 string query = 6; 22 CachingOptions cachingOptions = 7 [(gogoproto.nullable) = false]; 23 } 24 25 message PrometheusResponseHeader { 26 string Name = 1 [(gogoproto.jsontag) = "-"]; 27 repeated string Values = 2 [(gogoproto.jsontag) = "-"]; 28 } 29 30 message PrometheusResponse { 31 string Status = 1 [(gogoproto.jsontag) = "status"]; 32 PrometheusData Data = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "data,omitempty"]; 33 string ErrorType = 3 [(gogoproto.jsontag) = "errorType,omitempty"]; 34 string Error = 4 [(gogoproto.jsontag) = "error,omitempty"]; 35 repeated PrometheusResponseHeader Headers = 5 [(gogoproto.jsontag) = "-"]; 36 } 37 38 message PrometheusData { 39 string ResultType = 1 [(gogoproto.jsontag) = "resultType"]; 40 repeated SampleStream Result = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "result"]; 41 } 42 43 message SampleStream { 44 repeated cortexpb.LabelPair labels = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "metric", (gogoproto.customtype) = "github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter"]; 45 repeated cortexpb.Sample samples = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "values"]; 46 } 47 48 message CachedResponse { 49 string key = 1 [(gogoproto.jsontag) = "key"]; 50 51 // List of cached responses; non-overlapping and in order. 52 repeated Extent extents = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "extents"]; 53 } 54 55 message Extent { 56 int64 start = 1 [(gogoproto.jsontag) = "start"]; 57 int64 end = 2 [(gogoproto.jsontag) = "end"]; 58 // reserved the previous key to ensure cache transition 59 reserved 3; 60 string trace_id = 4 [(gogoproto.jsontag) = "-"]; 61 google.protobuf.Any response = 5 [(gogoproto.jsontag) = "response"]; 62 } 63 64 message CachingOptions { 65 bool disabled = 1; 66 }