Files

55 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
// Protobuf package should not be changed when moving around go packages
// in order to not break backward compatibility.
package frontend;
option go_package = "frontendv1pb";
import "gogoproto/gogo.proto";
import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
service Frontend {
// After calling this method, client enters a loop, in which it waits for
// a "FrontendToClient" message and replies with single "ClientToFrontend" message.
rpc Process(stream ClientToFrontend) returns (stream FrontendToClient) {};
// The client notifies the query-frontend that it started a graceful shutdown.
rpc NotifyClientShutdown(NotifyClientShutdownRequest) returns (NotifyClientShutdownResponse);
}
enum Type {
HTTP_REQUEST = 0;
GET_ID = 1;
HTTP_REQUEST_BATCH = 2;
}
enum Feature {
NONE = 0;
REQUEST_BATCHING = 1;
}
message FrontendToClient {
httpgrpc.HTTPRequest httpRequest = 1;
Type type = 2;
// bool statsEnabled = 3; - removed in 2.2. reserved until we can cleanly reclaim it
repeated httpgrpc.HTTPRequest httpRequestBatch = 4;
}
message ClientToFrontend {
httpgrpc.HTTPResponse httpResponse = 1;
string clientID = 2;
// stats.Stats stats = 3; - removed in 2.2. reserved until we can cleanly reclaim it
repeated httpgrpc.HTTPResponse httpResponseBatch = 4;
int32 features = 5; // used by the querier to indicate to the fronted that it supports
}
message NotifyClientShutdownRequest {
string clientID = 1;
}
message NotifyClientShutdownResponse {}