From 7145d82218a7d1e2ad30ce2788d0f24b6f8fd9be Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Thu, 17 Oct 2024 13:00:10 -0600 Subject: [PATCH] stats: add proto for snapshot index file (#25) Signed-off-by: Matt Klein --- .../protobuf/client/v1/metric.proto | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/bitdrift_public/protobuf/client/v1/metric.proto b/src/bitdrift_public/protobuf/client/v1/metric.proto index 74a794e..cdf0153 100644 --- a/src/bitdrift_public/protobuf/client/v1/metric.proto +++ b/src/bitdrift_public/protobuf/client/v1/metric.proto @@ -7,10 +7,26 @@ syntax = "proto3"; +import "google/protobuf/timestamp.proto"; import "validate/validate.proto"; package bitdrift_public.protobuf.client.v1; +// Used to track an index of pending aggregations that need to be uploaded. This is used by the +// file manager to coordinate merging and uploads. +message PendingAggregationIndex { + message PendingFile { + // Name of the file to upload. + string name = 1; + // The start of the period that this file covers. All metrics are aggregated over this period. + google.protobuf.Timestamp period_start = 2; + // True if an aggregation is ready to upload and should no longer be written to. + bool ready_to_upload = 3; + } + // List of files, in order of period_start, that are pending upload. + repeated PendingFile pending_files = 1; +} + message Counter { // Deprecated do not use this. At some point we will reserve this field and remove it. uint32 value_deprecated = 1;