From c6378d9dd2b30e39a86cf7397b9b9dfe7fe24099 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Sat, 18 Apr 2026 16:12:24 +0800 Subject: [PATCH] add protobuf --- proto/message.proto | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 proto/message.proto diff --git a/proto/message.proto b/proto/message.proto new file mode 100644 index 0000000..5beffee --- /dev/null +++ b/proto/message.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; + +message AuthRequest { + bytes uuid = 1; + bytes username = 2; + bytes salt = 3; + bytes token = 4; + int32 timestamp = 5; +} + +message AuthReply { + int32 code = 1; + bytes payload = 2; +} + +message Pub { + bytes topic = 1; + int32 qos = 2; + bytes content = 3; +} + +message Command { + int32 command_type = 1; + bytes command = 2; +} + +message JsonRpcRequest { + bytes method = 1; + bytes params = 2; +} + +message JsonRpcReply { + bytes result = 1; + bytes error = 2; +} + +message Data { + bytes route_key = 1; + bytes metric = 2; +} + +message TaskEventStream { + int32 task_id = 1; + bytes type = 2; + bytes stream = 3; +}