44 lines
1.1 KiB
Protocol Buffer
44 lines
1.1 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
||
|
|
package iroh;
|
||
|
|
import "google/protobuf/timestamp.proto";
|
||
|
|
import "google/protobuf/duration.proto";
|
||
|
|
|
||
|
|
service Iroh {
|
||
|
|
rpc RemoteInfo(RemoteInfoRequest) returns (RemoteInfoMessage);
|
||
|
|
rpc RemoteInfoIter(RemoteInfoIterRequest) returns (stream RemoteInfoMessage);
|
||
|
|
}
|
||
|
|
|
||
|
|
message RemoteInfoRequest {
|
||
|
|
string node_id = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
message RemoteInfoIterRequest {}
|
||
|
|
|
||
|
|
message RemoteInfoMessage {
|
||
|
|
string 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;
|
||
|
|
}
|
||
|
|
|
||
|
|
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;
|
||
|
|
}
|