caretta-sync/iroh-proto/proto/iroh.proto

48 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

2025-09-04 08:25:22 +09:00
syntax = "proto3";
package iroh;
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
service Iroh {
2025-09-05 06:22:36 +09:00
rpc RemoteInfo(RemoteInfoRequest) returns (RemoteInfoResponse);
rpc RemoteInfoIter(RemoteInfoIterRequest) returns (stream RemoteInfoResponse);
2025-09-04 08:25:22 +09:00
}
message RemoteInfoRequest {
2025-09-05 06:22:36 +09:00
bytes node_id = 1;
2025-09-04 08:25:22 +09:00
}
message RemoteInfoIterRequest {}
2025-09-05 06:22:36 +09:00
message RemoteInfoResponse {
RemoteInfoMessage remote_info = 1;
}
2025-09-04 08:25:22 +09:00
message RemoteInfoMessage {
2025-09-05 06:22:36 +09:00
bytes node_id = 1;
2025-09-04 08:25:22 +09:00
string relay_url = 2;
repeated DirectAddrInfoMessage addrs = 3;
string conn_type = 4;
google.protobuf.Duration latency = 5;
google.protobuf.Duration last_used = 6;
}
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;
}
message LastControlMessage {
google.protobuf.Duration duration = 1;
string control_msg = 2;
}
message SourceMessage {
string source = 1;
google.protobuf.Duration duration = 2;
}