Skip to content

Commit

Permalink
GetState gRPC for current state (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen Yui authored Jul 24, 2020
1 parent 28dd8e9 commit 5d58fdb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions chief_of_state/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import "chief_of_state/common.proto";
service ChiefOfStateService {
// Used to process command sent by an application
rpc ProcessCommand(ProcessCommandRequest) returns (ProcessCommandResponse);
// Used to get the current state of that entity
rpc GetState(GetStateRequest) returns (GetStateResponse);
}

// ProcessCommandRequest
Expand All @@ -32,3 +34,14 @@ message ProcessCommandResponse {
// additional meta data
MetaData meta = 2;
}

message GetStateRequest {
string entity_id = 1;
}

message GetStateResponse {
// the current state of the entity
google.protobuf.Any state = 1;
// additional meta data
MetaData meta = 2;
}

0 comments on commit 5d58fdb

Please sign in to comment.