From aeac6b5af782c36279fc0f0f83e6120ec28bfd27 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 1 Dec 2024 18:59:34 -0600 Subject: [PATCH] minor autogenpb fixes --- Makefile | 2 +- event.proto | 4 ++-- hypervisor.proto | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7540aeb..c9517e5 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ hypervisor.pb.go: hypervisor.proto autogenpb --proto hypervisor.proto --mutex event.pb.go: event.proto - autogenpb --proto event.proto --mutex + autogenpb --proto event.proto --mutex --no-sort experiments.pb.go: experiments.proto autogenpb --proto experiments.proto --no-marshal --no-sort diff --git a/event.proto b/event.proto index 49a8543..8e098b5 100644 --- a/event.proto +++ b/event.proto @@ -4,7 +4,7 @@ package virtbuf; import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp import "google/protobuf/any.proto"; // Import the well-known type for Timestamp -message Events { +message Events { // `autogenpb:marshal` 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 @@ -17,7 +17,7 @@ message Events { // 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 { - int32 id = 1; + int32 id = 1; // `autogenpb:unique` // should be unique across the cluster EventType etype = 2; string droplet = 3; // name of the droplet string droplet_uuid = 4; // uuid of the droplet diff --git a/hypervisor.proto b/hypervisor.proto index ccbbb6b..d91aef3 100644 --- a/hypervisor.proto +++ b/hypervisor.proto @@ -1,15 +1,15 @@ syntax = "proto3"; package virtbuf; -message Hypervisors { +message Hypervisors { // `autogenpb:marshal` 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 repeated Hypervisor hypervisors = 3; } message Hypervisor { - string uuid = 1; - string hostname = 2; + string uuid = 1; // `autogenpb:unique` + string hostname = 2; // `autogenpb:unique` bool active = 3; // is allowed to start new droplets int64 cpus = 4; int64 memory = 5; // in bytes