Permalink
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (46 sloc) 1.05 KB
syntax = "proto3";
package anycable;
service RPC {
rpc Connect (ConnectionRequest) returns (ConnectionResponse) {}
rpc Command (CommandMessage) returns (CommandResponse) {}
rpc Disconnect (DisconnectRequest) returns (DisconnectResponse) {}
}
enum Status {
ERROR = 0;
SUCCESS = 1;
FAILURE = 2;
}
message ConnectionRequest {
string path = 1;
map<string,string> headers = 2;
}
message ConnectionResponse {
Status status = 1;
string identifiers = 2;
repeated string transmissions = 3;
string error_msg = 4;
}
message CommandMessage {
string command = 1;
string identifier = 2;
string connection_identifiers = 3;
string data = 4;
}
message CommandResponse {
Status status = 1;
bool disconnect = 2;
bool stop_streams = 3;
repeated string streams = 4;
repeated string transmissions = 5;
string error_msg = 6;
}
message DisconnectRequest {
string identifiers = 1;
repeated string subscriptions = 2;
string path = 3;
map<string,string> headers = 4;
}
message DisconnectResponse {
Status status = 1;
string error_msg = 2;
}