Skip to content

Instantly share code, notes, and snippets.

@davesnowdon
Created September 22, 2022 20:16
Show Gist options
  • Save davesnowdon/448d8a3f8b251d691d25805359664893 to your computer and use it in GitHub Desktop.
Save davesnowdon/448d8a3f8b251d691d25805359664893 to your computer and use it in GitHub Desktop.
syntax = "proto3";
option go_package = "github.com/TheSocialRobot/BrainCore/thesocialrobot";
package thesocialrobot;
service TheSocialRobot {
rpc EventStream(stream BodyEvent) returns (stream BodyCommand) {}
}
// event from robot (the body) containing current state
message BodyEvent {
int32 id = 1;
}
message Say {
string text = 1;
}
message Action {
// delay in milliseconds before triggering the action
// could use the Duration type here, but don't think we need nanosecond
// precision and the second/nanosecond split complicates things
int32 delay = 1;
oneof action {
Say say = 2;
}
}
// message from brain to body, instructing the body do take one or more actions
message BodyCommand {
int32 id = 1;
repeated Action actions = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment