Skip to content

Commit

Permalink
Move all messages under Any and decouple flows
Browse files Browse the repository at this point in the history
  • Loading branch information
andronat committed Oct 4, 2024
1 parent 0802c88 commit b9434ac
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 164 deletions.
122 changes: 73 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions proto/common/v1/misc.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package common.v1;

import "google/protobuf/timestamp.proto";

message Ping {
string id = 1;
google.protobuf.Timestamp timestamp = 2;
}

message Pong {
string id = 1;
google.protobuf.Timestamp timestamp = 2;
google.protobuf.Timestamp ping_timestamp = 3;
}
31 changes: 31 additions & 0 deletions proto/common/v1/orb.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
syntax = "proto3";

package common.v1;

// Wrapper message for all messages that can be sent to and from the orb. The reason we do this is to ensure static
// typing in the clients while the server can still handle all messages through the Any type.
message W {
oneof w {
NoState no_state = 1;
AnnounceOrbId announce_orb_id = 2;
}
}

message NoState {}
message AnnounceOrbId {
enum ModeType {
MODE_TYPE_UNSPECIFIED = 0;
MODE_TYPE_LEGACY = 1;
MODE_TYPE_SELF_SERVE = 2;
}

enum HardwareType {
HARDWARE_TYPE_UNSPECIFIED = 0;
HARDWARE_TYPE_PEARL = 1;
HARDWARE_TYPE_DIAMOND = 2;
}

string orb_id = 1;
ModeType mode_type = 2;
HardwareType hardware_type = 3;
}
Loading

0 comments on commit b9434ac

Please sign in to comment.