syntax = "proto3"; package caretta_sync; import "caretta_sync.common.proto"; import "tripod_id.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; service Peer { rpc Info(PeerInfoRequest) returns (PeerInfoResponse); rpc InfoStream(stream PeerInfoStreamRequest) returns (stream PeerInfoStreamResponse); } message PeerInfoRequest { caretta_sync.common.PeerIdentifier peer = 1; } message PeerInfoStreamRequest {} message PeerInfoResponse { PeerInfo peer_info = 1; } message PeerInfoStreamResponse { PeerInfo peer_info = 1; } message PeerInfo { tripod_id.Double id = 1; caretta_sync.common.PublicKey public_key = 2; string relay_url = 3; repeated DirectAddrInfo addrs = 4; string conn_type = 5; google.protobuf.Duration latency = 6; google.protobuf.Duration last_used = 7; } message DirectAddrInfo { string addr = 1; google.protobuf.Duration latency = 2; LastControl last_control = 3; google.protobuf.Duration last_payload = 4; google.protobuf.Duration last_alive = 5; repeated Source sources = 6; } message LastControl { google.protobuf.Duration duration = 1; string control_msg = 2; } message Source { string source = 1; google.protobuf.Duration duration = 2; }