grpshuffle.proto (20 lines of code) (raw):
syntax = "proto3";
package grpshuffle;
option go_package = "github.com/korosuke613/grpshuffle/go/grpshuffle";
message Combination {
repeated string targets = 1; // Target to be shuffled.
}
message ShuffleRequest {
repeated string targets = 1; // Target to be shuffled.
// sint32 partition = 2; // The number of groups to divide into.
reserved 2;
reserved "partition";
uint64 divide = 4; // The number of groups to divide into.
bool sequential = 3; // If true, do not shuffle.
}
message ShuffleResponse {
repeated Combination combinations= 1; // Set of targets.
}
service Compute {
rpc Shuffle(ShuffleRequest) returns (ShuffleResponse); // Shuffle.
}