anypb is probably overkill here

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-25 03:34:03 -05:00
parent e706152207
commit 2882686caf
1 changed files with 10 additions and 2 deletions

View File

@ -11,6 +11,11 @@ message Events {
repeated Event events = 4; // all the events repeated Event events = 4; // all the events
} }
// this information leans towards being human readable not programatic
// in other words, it's better to just have the droplet name here rather than the uuid
// at least for now in the early days. but maybe forever.
// homelab clouds normally don't have many events.
// we are talking less than 1 a minute. even 1 an hour is often a lot
message Event { message Event {
int32 id = 1; int32 id = 1;
EventType etype = 2; EventType etype = 2;
@ -20,8 +25,11 @@ message Event {
string hypervisor_uuid = 6; // uuid of the hypervisor string hypervisor_uuid = 6; // uuid of the hypervisor
google.protobuf.Timestamp start = 7; // start time google.protobuf.Timestamp start = 7; // start time
google.protobuf.Timestamp end = 8; // end time google.protobuf.Timestamp end = 8; // end time
google.protobuf.Any orig_val = 9; // original value string field_name = 9; // the field name that changed
google.protobuf.Any new_val = 10; // new value string orig_val = 10; // original value
string new_val = 11; // new value
google.protobuf.Any orig_any = 12; // anypb format. probably overkill
google.protobuf.Any new_any = 13; // anypb format
} }
enum EventType { enum EventType {