2024-10-22 23:35:52 -05:00
|
|
|
syntax = "proto3";
|
|
|
|
package virtbuf;
|
|
|
|
|
2024-10-24 16:04:26 -05:00
|
|
|
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
|
|
|
import "google/protobuf/any.proto"; // Import the well-known type for Timestamp
|
|
|
|
|
2024-10-22 23:35:52 -05:00
|
|
|
message Events {
|
2024-10-24 15:30:51 -05:00
|
|
|
string uuid = 1; // I guess why not just have this on each file
|
|
|
|
string version = 2; // maybe can be used for protobuf schema change violations
|
|
|
|
int64 event_size = 3; // max events to store in a single
|
|
|
|
repeated Event events = 4; // all the events
|
2024-10-24 17:12:05 -05:00
|
|
|
|
|
|
|
// is it possible to have custom formatting in JSON and TEXT marshal/unmarshal ?
|
|
|
|
StorageInfo humantest = 5;
|
2024-10-22 23:35:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message Event {
|
2024-10-24 16:04:26 -05:00
|
|
|
int32 id = 1;
|
|
|
|
EventType etype = 2;
|
|
|
|
string droplet = 3; // name of the droplet
|
|
|
|
string droplet_uuid = 4; // uuid of the droplet
|
|
|
|
string hypervisor = 5; // name of the hypervisor
|
|
|
|
string hypervisor_uuid = 6; // uuid of the hypervisor
|
|
|
|
google.protobuf.Timestamp start = 7; // start time
|
|
|
|
google.protobuf.Timestamp end = 8; // end time
|
|
|
|
google.protobuf.Any orig_val = 9; // original value
|
|
|
|
google.protobuf.Any new_val = 10; // new value
|
2024-10-22 23:35:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
enum EventType {
|
|
|
|
ADD = 0;
|
|
|
|
DELETE = 1;
|
|
|
|
POWERON = 2;
|
|
|
|
POWEROFF = 3; // should indicate a "normal" shutdown
|
|
|
|
HIBERNATE = 4;
|
|
|
|
MIGRATE = 5;
|
|
|
|
DEMO = 6;
|
|
|
|
GET = 7; // request something
|
|
|
|
LOGIN = 8; // attempt to login
|
|
|
|
OK = 9; // everything is ok
|
|
|
|
FAIL = 10; // everything failed
|
|
|
|
CRASH = 11; // droplet hard crashed
|
2024-10-24 15:30:51 -05:00
|
|
|
CHANGE = 12; // droplet or hypervisor config change
|
2024-10-22 23:35:52 -05:00
|
|
|
}
|
2024-10-24 17:12:05 -05:00
|
|
|
|
|
|
|
message StorageInfo {
|
|
|
|
int64 capacity = 1; // Stores the storage capacity in bytes.
|
|
|
|
}
|