blob: 94959a35df57ab92fdd5fdae5dce962e06726555 [file] [log] [blame]
syntax = "proto3";
package experiment;
//import "google/protobuf/empty.proto";
message AsyncEvent {
int32 seq = 1;
enum EventType {
BIG_BANG = 0; // just a big bang
SMALL_BANG = 1; // so small bang
NO_BANG = 2;
}
EventType type = 2;
string details = 3;
}
enum khenType {
BIG_KHEN = 0;
SMALL_KHEN = 1;
NO_KHEN = 2;
}
message Packet {
int32 source = 1;
bytes content = 2;
message Result {
string url = 1;
string title = 2;
repeated string snippets = 3;
message Success {
string input = 1;
string desc = 2;
}
repeated Success success = 4;
}
repeated Result results = 3;
}
message Echo {
string msg = 1;
float delay = 2;
}
message testMessage{
oneof oneOfTest {
string test2 = 1;
int32 test3 = 2;
}
}
service ExperimentalService {
rpc GetEcho(Echo) returns(Echo);
// For server to send async stream to client
rpc ReceiveStreamedEvents(Packet)
returns(stream AsyncEvent);
// For server to send async packets to client
rpc ReceivePackets(Echo) returns(stream Packet);
// For client to send async packets to server
rpc SendPackets(stream Packet) returns(Echo);
}