hodu/main.proto

45 lines
558 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package main;
option go_package = ".";
service Control {
rpc Open (OpenReq) returns (OpenRes);
rpc Close (CloseReq) returns (CloseRes);
rpc Channel (stream Frame) returns (stream Frame);
}
message OpenReq {
string abc = 1;
}
message OpenRes {
string def = 1;
}
message CloseReq {
string abc = 1;
}
message CloseRes {
string def = 1;
}
message Data {
uint32 chan_id = 1;
uint32 conn_id = 2;
bytes data = 3;
}
message Error {
uint32 code = 1;
}
message Frame {
oneof frame {
Data data = 1;
Error error = 2;
}
}