caretta-sync/core/proto/caretta_sync.proto

52 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2025-08-01 09:25:20 +09:00
syntax = "proto3";
package caretta_sync;
2025-08-12 07:29:23 +09:00
import "google/protobuf/timestamp.proto";
2025-09-06 09:42:14 +09:00
import "google/protobuf/duration.proto";
2025-08-01 09:25:20 +09:00
2025-09-06 09:42:14 +09:00
service CarettaSync {
rpc RemoteInfo(RemoteInfoRequest) returns (RemoteInfoResponse);
rpc RemoteInfoIter(RemoteInfoIterRequest) returns (stream RemoteInfoResponse);
2025-08-01 09:25:20 +09:00
}
2025-09-06 09:42:14 +09:00
message NodeIdMessage {
bytes node_id = 1;
2025-08-01 09:25:20 +09:00
}
2025-09-06 09:42:14 +09:00
message RemoteInfoRequest {
NodeIdMessage node_id = 1;
}
message RemoteInfoIterRequest {}
message RemoteInfoResponse {
RemoteInfoMessage remote_info = 1;
}
message RemoteInfoMessage {
NodeIdMessage node_id = 1;
string relay_url = 2;
repeated DirectAddrInfoMessage addrs = 3;
string conn_type = 4;
google.protobuf.Duration latency = 5;
google.protobuf.Duration last_used = 6;
}
2025-08-01 09:25:20 +09:00
2025-09-06 09:42:14 +09:00
message DirectAddrInfoMessage {
string addr = 1;
google.protobuf.Duration latency = 2;
LastControlMessage last_control = 3;
google.protobuf.Duration last_payload = 4;
google.protobuf.Duration last_alive = 5;
repeated SourceMessage sources = 6;
2025-08-12 07:29:23 +09:00
}
2025-08-05 08:17:35 +09:00
2025-09-06 09:42:14 +09:00
message LastControlMessage {
google.protobuf.Duration duration = 1;
string control_msg = 2;
2025-08-01 09:25:20 +09:00
}
2025-09-06 09:42:14 +09:00
message SourceMessage {
string source = 1;
google.protobuf.Duration duration = 2;
2025-08-01 09:25:20 +09:00
}