feat: protobuf input messaging (#165)

Replace json protocol by protobuf
generate protobuf files with `bun buf generate` or just `buf generate`

- [x]  Implement all datatypes with proto files

- [x] Map to ts types or use the generated proto types directly with:
   - [x] web frontend
   - [x] relay
   - [x] runner

- [ ] final performance test (to be done when CI builds new images)

---------

Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
Philipp Neumann
2025-01-28 15:04:20 +01:00
committed by GitHub
parent 431733a0e8
commit fbaa8835a3
38 changed files with 2758 additions and 647 deletions

View File

@@ -0,0 +1,60 @@
// @generated by protoc-gen-es v2.2.3 with parameter "target=ts"
// @generated from file latency_tracker.proto (package proto, syntax proto3)
/* eslint-disable */
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { Timestamp } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file latency_tracker.proto.
*/
export const file_latency_tracker: GenFile = /*@__PURE__*/
fileDesc("ChVsYXRlbmN5X3RyYWNrZXIucHJvdG8SBXByb3RvIk4KE1Byb3RvVGltZXN0YW1wRW50cnkSDQoFc3RhZ2UYASABKAkSKAoEdGltZRgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiWgoTUHJvdG9MYXRlbmN5VHJhY2tlchITCgtzZXF1ZW5jZV9pZBgBIAEoCRIuCgp0aW1lc3RhbXBzGAIgAygLMhoucHJvdG8uUHJvdG9UaW1lc3RhbXBFbnRyeUIWWhRyZWxheS9pbnRlcm5hbC9wcm90b2IGcHJvdG8z", [file_google_protobuf_timestamp]);
/**
* @generated from message proto.ProtoTimestampEntry
*/
export type ProtoTimestampEntry = Message<"proto.ProtoTimestampEntry"> & {
/**
* @generated from field: string stage = 1;
*/
stage: string;
/**
* @generated from field: google.protobuf.Timestamp time = 2;
*/
time?: Timestamp;
};
/**
* Describes the message proto.ProtoTimestampEntry.
* Use `create(ProtoTimestampEntrySchema)` to create a new message.
*/
export const ProtoTimestampEntrySchema: GenMessage<ProtoTimestampEntry> = /*@__PURE__*/
messageDesc(file_latency_tracker, 0);
/**
* @generated from message proto.ProtoLatencyTracker
*/
export type ProtoLatencyTracker = Message<"proto.ProtoLatencyTracker"> & {
/**
* @generated from field: string sequence_id = 1;
*/
sequenceId: string;
/**
* @generated from field: repeated proto.ProtoTimestampEntry timestamps = 2;
*/
timestamps: ProtoTimestampEntry[];
};
/**
* Describes the message proto.ProtoLatencyTracker.
* Use `create(ProtoLatencyTrackerSchema)` to create a new message.
*/
export const ProtoLatencyTrackerSchema: GenMessage<ProtoLatencyTracker> = /*@__PURE__*/
messageDesc(file_latency_tracker, 1);