32 lines
665 B
Protocol Buffer
32 lines
665 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package IDService;
|
|
|
|
service IDService {
|
|
// Fetch a batch of IDs.
|
|
rpc GetBatch (BatchRequest) returns (BatchResponse) {}
|
|
|
|
// Submit processed batch of data.
|
|
rpc SubmitBatch (SubmitRequest) returns (SubmitResponse) {}
|
|
}
|
|
|
|
message BatchRequest {
|
|
string client_id = 1;
|
|
}
|
|
|
|
// The BatchResponse message contains the IDs.
|
|
message BatchResponse {
|
|
repeated string ids = 1;
|
|
}
|
|
|
|
// The SubmitRequest message contains the client id and a batch of data.
|
|
message SubmitRequest {
|
|
string client_id = 1;
|
|
repeated string data = 2;
|
|
}
|
|
|
|
// The SubmitResponse message confirms successful batch processing.
|
|
message SubmitResponse {
|
|
bool success = 1;
|
|
}
|