syntax = "proto3"; package chord; service ChordNode { rpc FindSuccessor (FindSuccessorRequest) returns (FindSuccessorResponse); rpc GetSuccessor (GetSuccessorRequest) returns (GetSuccessorResponse); rpc GetPredecessor (GetPredecessorRequest) returns (GetPredecessorResponse); rpc Notify (NotifyRequest) returns (NotifyResponse); rpc Ping (PingRequest) returns (PingResponse); } enum IpVersion { IPV4 = 0; IPV6 = 1; } message IpAddress { IpVersion version = 1; bytes address = 2; } message Node { uint64 id = 1; IpAddress ip = 2; int32 port = 3; } message FindSuccessorRequest { uint64 id = 1; } message FindSuccessorResponse { Node node = 2; } message GetSuccessorRequest { } message GetSuccessorResponse { Node node = 1; } message GetPredecessorRequest { } message GetPredecessorResponse { optional Node node = 1; } message NotifyRequest { Node node = 1; } message NotifyResponse { } message PingRequest { } message PingResponse { }