syntax = "proto3"; option go_package = "./hodu"; // this one affects the full name of the the actual calls. // /./ // i want to keep the package line commented out such that // the full name is // (e.g. /Hodu/GetSeed) //package hodu; service Hodu { rpc GetSeed (Seed) returns (Seed) {} rpc PacketStream (stream Packet) returns (stream Packet) {} } message Seed { uint32 Version = 1; uint64 Flags = 2; } enum ROUTE_PROTO { TCP = 0; TCP4 = 1; TCP6 = 2; }; message RouteDesc { uint32 RouteId = 1; string TargetAddrStr = 2; ROUTE_PROTO ServiceProto = 3; string ServiceNetStr = 4; }; message PeerDesc { uint32 RouteId = 1; uint32 PeerId = 2; string RemoteAddrStr = 3; string LocalAddrStr = 4; }; message PeerData { uint32 RouteId = 1; uint32 PeerId = 2; bytes Data = 3; }; enum PACKET_KIND { RESERVED = 0; // not used ROUTE_START = 1; ROUTE_STOP = 2; ROUTE_STARTED = 3; ROUTE_STOPPED = 4; PEER_STARTED = 5; PEER_STOPPED = 6; PEER_ABORTED = 7; PEER_EOF = 8; PEER_DATA = 9; }; message Packet { PACKET_KIND Kind = 1; oneof U { RouteDesc Route = 2; PeerDesc Peer = 3; PeerData Data = 4; }; }