github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/lokifrontend/frontend/v1/frontendv1pb/frontend.proto (about)

     1  syntax = "proto3";
     2  
     3  // Protobuf package should not be changed when moving around go packages
     4  // in order to not break backward compatibility.
     5  package frontend;
     6  
     7  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
     8  import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto";
     9  import "pkg/querier/stats/stats.proto";
    10  
    11  option go_package = "frontendv1pb";
    12  option (gogoproto.marshaler_all) = true;
    13  option (gogoproto.unmarshaler_all) = true;
    14  
    15  service Frontend {
    16    // After calling this method, client enters a loop, in which it waits for
    17    // a "FrontendToClient" message and replies with single "ClientToFrontend" message.
    18    rpc Process(stream ClientToFrontend) returns (stream FrontendToClient) {}
    19  
    20    // The client notifies the query-frontend that it started a graceful shutdown.
    21    rpc NotifyClientShutdown(NotifyClientShutdownRequest) returns (NotifyClientShutdownResponse);
    22  }
    23  
    24  enum Type {
    25    HTTP_REQUEST = 0;
    26    GET_ID = 1;
    27  }
    28  
    29  message FrontendToClient {
    30    httpgrpc.HTTPRequest httpRequest = 1;
    31    Type type = 2;
    32  
    33    // Whether query statistics tracking should be enabled. The response will include
    34    // statistics only when this option is enabled.
    35    bool statsEnabled = 3;
    36  }
    37  
    38  message ClientToFrontend {
    39    httpgrpc.HTTPResponse httpResponse = 1;
    40    string clientID = 2;
    41    stats.Stats stats = 3;
    42  }
    43  
    44  message NotifyClientShutdownRequest {
    45    string clientID = 1;
    46  }
    47  
    48  message NotifyClientShutdownResponse {}