github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/querier/queryrange/queryrangebase/queryrange.proto (about)

     1  syntax = "proto3";
     2  
     3  package queryrangebase;
     4  
     5  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
     6  import "google/protobuf/any.proto";
     7  import "google/protobuf/duration.proto";
     8  import "pkg/logproto/logproto.proto";
     9  import "pkg/querier/queryrange/queryrangebase/definitions/definitions.proto";
    10  
    11  option go_package = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase";
    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 [
    21      (gogoproto.stdduration) = true,
    22      (gogoproto.nullable) = false
    23    ];
    24    string query = 6;
    25    definitions.CachingOptions cachingOptions = 7 [(gogoproto.nullable) = false];
    26    repeated definitions.PrometheusRequestHeader Headers = 8 [(gogoproto.jsontag) = "-"];
    27  }
    28  
    29  message PrometheusResponse {
    30    string Status = 1 [(gogoproto.jsontag) = "status"];
    31    PrometheusData Data = 2 [
    32      (gogoproto.nullable) = false,
    33      (gogoproto.jsontag) = "data,omitempty"
    34    ];
    35    string ErrorType = 3 [(gogoproto.jsontag) = "errorType,omitempty"];
    36    string Error = 4 [(gogoproto.jsontag) = "error,omitempty"];
    37    repeated definitions.PrometheusResponseHeader Headers = 5 [(gogoproto.jsontag) = "-"];
    38  }
    39  
    40  message PrometheusData {
    41    string ResultType = 1 [(gogoproto.jsontag) = "resultType"];
    42    repeated SampleStream Result = 2 [
    43      (gogoproto.nullable) = false,
    44      (gogoproto.jsontag) = "result"
    45    ];
    46  }
    47  
    48  message SampleStream {
    49    repeated logproto.LegacyLabelPair labels = 1 [
    50      (gogoproto.nullable) = false,
    51      (gogoproto.jsontag) = "metric",
    52      (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter"
    53    ];
    54    repeated logproto.LegacySample samples = 2 [
    55      (gogoproto.nullable) = false,
    56      (gogoproto.jsontag) = "values"
    57    ];
    58  }
    59  
    60  message CachedResponse {
    61    string key = 1 [(gogoproto.jsontag) = "key"];
    62  
    63    // List of cached responses; non-overlapping and in order.
    64    repeated Extent extents = 2 [
    65      (gogoproto.nullable) = false,
    66      (gogoproto.jsontag) = "extents"
    67    ];
    68  }
    69  
    70  message Extent {
    71    int64 start = 1 [(gogoproto.jsontag) = "start"];
    72    int64 end = 2 [(gogoproto.jsontag) = "end"];
    73    // reserved the previous key to ensure cache transition
    74    reserved 3;
    75    string trace_id = 4 [(gogoproto.jsontag) = "-"];
    76    google.protobuf.Any response = 5 [(gogoproto.jsontag) = "response"];
    77  }