Added proto.Advert type to protobuf definitions
This commit is contained in:
		| @@ -2,7 +2,7 @@ syntax = "proto3"; | ||||
|  | ||||
| // Router service is used by the proxy to lookup routes | ||||
| service Router { | ||||
|         rpc Watch(WatchRequest) returns (stream TableEvent) {}; | ||||
|         rpc Watch(WatchRequest) returns (stream Event) {}; | ||||
| 	rpc Lookup(LookupRequest) returns (LookupResponse) {}; | ||||
|         rpc List(ListRequest) returns (ListResponse) {}; | ||||
| } | ||||
| @@ -20,16 +20,36 @@ message LookupResponse { | ||||
| // WatchRequest is made to Watch Router | ||||
| message WatchRequest {} | ||||
|  | ||||
| // EventType is TableEvent type | ||||
| // AdvertType defines the type of advert | ||||
| enum AdvertType { | ||||
|         AdvertAnnounce = 0; | ||||
|         AdvertUpdate = 1; | ||||
| } | ||||
|  | ||||
| // Advert is router advertsement streamed by Watch | ||||
| message Advert { | ||||
|         // id of the advertising router | ||||
|         string id = 1; | ||||
|         // type of advertisement | ||||
|         AdvertType type = 2; | ||||
|         // unix timestamp of the advertisement | ||||
|         int64 timestamp = 3; | ||||
|         // TTL of the Advert | ||||
|         int64 ttl = 4; | ||||
|         // events is a list of advertised events | ||||
|         repeated Event events = 5; | ||||
| } | ||||
|  | ||||
| // EventType defines the type of event | ||||
| enum EventType { | ||||
|         Create = 0; | ||||
|         Delete = 1; | ||||
|         Update = 2; | ||||
| } | ||||
|  | ||||
| // TableEvent is streamed by WatchRequest | ||||
| message TableEvent { | ||||
|         // time of table event | ||||
| // Event is routing table event | ||||
| message Event { | ||||
|         // type of event | ||||
|         EventType type = 1; | ||||
|         // unix timestamp of event | ||||
|         int64 timestamp = 2; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user