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

Move all messages under Any and decouple flows #32

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading