Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc: add bidi stream #104

Merged
merged 6 commits into from
Jun 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions old-faithful-proto/proto/old-faithful.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ service OldFaithful {

rpc GetBlock(BlockRequest) returns (BlockResponse);
rpc GetTransaction(TransactionRequest) returns (TransactionResponse);

rpc Get(stream GetRequest) returns (stream GetResponse);
}

message VersionRequest {}
Expand Down Expand Up @@ -47,3 +49,21 @@ message Transaction {
bytes meta = 2; // bincode or protobuf
optional uint64 index = 4; // position in the block
}

message GetRequest {
uint64 id = 1;
oneof request {
VersionRequest version = 2;
BlockRequest block = 3;
TransactionRequest transaction = 4;
}
}

message GetResponse {
uint64 id = 1;
oneof response {
VersionResponse version = 2;
BlockResponse block = 3;
TransactionResponse transaction = 4;
}
}
Loading