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

     1  syntax = "proto3";
     2  
     3  package queryrange;
     4  
     5  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
     6  import "google/protobuf/timestamp.proto";
     7  import "pkg/logproto/logproto.proto";
     8  import "pkg/logqlmodel/stats/stats.proto";
     9  import "pkg/querier/queryrange/queryrangebase/definitions/definitions.proto";
    10  import "pkg/querier/queryrange/queryrangebase/queryrange.proto";
    11  
    12  option (gogoproto.marshaler_all) = true;
    13  option (gogoproto.unmarshaler_all) = true;
    14  
    15  message LokiRequest {
    16    string query = 1;
    17    uint32 limit = 2;
    18    int64 step = 3;
    19    int64 interval = 9;
    20    google.protobuf.Timestamp startTs = 4 [
    21      (gogoproto.stdtime) = true,
    22      (gogoproto.nullable) = false
    23    ];
    24    google.protobuf.Timestamp endTs = 5 [
    25      (gogoproto.stdtime) = true,
    26      (gogoproto.nullable) = false
    27    ];
    28    logproto.Direction direction = 6;
    29    string path = 7;
    30    repeated string shards = 8 [(gogoproto.jsontag) = "shards"];
    31  }
    32  
    33  message LokiInstantRequest {
    34    string query = 1;
    35    uint32 limit = 2;
    36    google.protobuf.Timestamp timeTs = 3 [
    37      (gogoproto.stdtime) = true,
    38      (gogoproto.nullable) = false
    39    ];
    40    logproto.Direction direction = 4;
    41    string path = 5;
    42    repeated string shards = 6 [(gogoproto.jsontag) = "shards"];
    43  }
    44  
    45  message LokiResponse {
    46    string Status = 1 [(gogoproto.jsontag) = "status"];
    47    LokiData Data = 2 [
    48      (gogoproto.nullable) = false,
    49      (gogoproto.jsontag) = "data,omitempty"
    50    ];
    51    string ErrorType = 3 [(gogoproto.jsontag) = "errorType,omitempty"];
    52    string Error = 4 [(gogoproto.jsontag) = "error,omitempty"];
    53    logproto.Direction direction = 5;
    54    uint32 limit = 6;
    55    uint32 version = 7;
    56    stats.Result statistics = 8 [
    57      (gogoproto.nullable) = false,
    58      (gogoproto.jsontag) = "statistics"
    59    ];
    60    repeated definitions.PrometheusResponseHeader Headers = 9 [
    61      (gogoproto.jsontag) = "-",
    62      (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader"
    63    ];
    64  }
    65  
    66  message LokiSeriesRequest {
    67    repeated string match = 1;
    68    google.protobuf.Timestamp startTs = 2 [
    69      (gogoproto.stdtime) = true,
    70      (gogoproto.nullable) = false
    71    ];
    72    google.protobuf.Timestamp endTs = 3 [
    73      (gogoproto.stdtime) = true,
    74      (gogoproto.nullable) = false
    75    ];
    76    string path = 4;
    77    repeated string shards = 5 [(gogoproto.jsontag) = "shards"];
    78  }
    79  
    80  message LokiSeriesResponse {
    81    string Status = 1 [(gogoproto.jsontag) = "status"];
    82    repeated logproto.SeriesIdentifier Data = 2 [
    83      (gogoproto.nullable) = false,
    84      (gogoproto.jsontag) = "data,omitempty"
    85    ];
    86    uint32 version = 3;
    87    repeated definitions.PrometheusResponseHeader Headers = 4 [
    88      (gogoproto.jsontag) = "-",
    89      (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader"
    90    ];
    91    stats.Result statistics = 5 [
    92      (gogoproto.nullable) = false,
    93      (gogoproto.jsontag) = "statistics"
    94    ];
    95  }
    96  
    97  message LokiLabelNamesRequest {
    98    google.protobuf.Timestamp startTs = 1 [
    99      (gogoproto.stdtime) = true,
   100      (gogoproto.nullable) = false
   101    ];
   102    google.protobuf.Timestamp endTs = 2 [
   103      (gogoproto.stdtime) = true,
   104      (gogoproto.nullable) = false
   105    ];
   106    string path = 3;
   107  }
   108  
   109  message LokiLabelNamesResponse {
   110    string Status = 1 [(gogoproto.jsontag) = "status"];
   111    repeated string Data = 2 [(gogoproto.jsontag) = "data,omitempty"];
   112    uint32 version = 3;
   113    repeated definitions.PrometheusResponseHeader Headers = 4 [
   114      (gogoproto.jsontag) = "-",
   115      (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader"
   116    ];
   117    stats.Result statistics = 5 [
   118      (gogoproto.nullable) = false,
   119      (gogoproto.jsontag) = "statistics"
   120    ];
   121  }
   122  
   123  message LokiData {
   124    string ResultType = 1 [(gogoproto.jsontag) = "resultType"];
   125    repeated logproto.StreamAdapter Result = 2 [
   126      (gogoproto.nullable) = false,
   127      (gogoproto.jsontag) = "result",
   128      (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.Stream"
   129    ];
   130  }
   131  
   132  // LokiPromResponse wraps a Prometheus response with statistics.
   133  message LokiPromResponse {
   134    queryrangebase.PrometheusResponse response = 1 [(gogoproto.nullable) = true];
   135    stats.Result statistics = 2 [(gogoproto.nullable) = false];
   136  }
   137  
   138  message IndexStatsResponse {
   139    logproto.IndexStatsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.IndexStatsResponse"];
   140    repeated definitions.PrometheusResponseHeader Headers = 2 [
   141      (gogoproto.jsontag) = "-",
   142      (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader"
   143    ];
   144  }