Skip to content

Commit

Permalink
Changes in gateway_info_v2
Browse files Browse the repository at this point in the history
* Change min_refreshed_at => min_updated_at

* Remove db service fields from gateway_info_v2

* Add info_batch_v2 endpoint

* Add info_v2 endpoint

* Add comment to refreshed_at
  • Loading branch information
kurotych authored Dec 17, 2024
1 parent 16d6838 commit b4c8c8f
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/service/mobile_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ message gateway_info_v2 {
// the asserted device type of the gateway
device_type device_type = 3;
// The unix epoch timestamp (in seconds)
// when the data was read from chain and written to the db
uint64 refreshed_at = 4;
// The unix epoch timestamp (in seconds)
// when the gateway was first added to the database.
uint64 created_at = 5;
uint64 created_at = 4;
}

message gateway_info_req_v1 {
Expand Down Expand Up @@ -142,10 +139,9 @@ message gateway_info_stream_req_v2 {
// Returns all devices if empty
repeated device_type device_types = 4;
// The Unix epoch timestamp (in seconds).
// Filters the response based on the `refreshed_at` field in `gateway_info`.
// Returns only gateways where `refreshed_at` >= `min_refreshed_at`.
// Use 0 to fetch all gateways.
uint64 min_refreshed_at = 5;
// Filters the response based on the last time gateway parameter(s) was
// updated. Use 0 to fetch all gateways.
uint64 min_updated_at = 5;
}

message gateway_info_stream_res_v1 {
Expand Down Expand Up @@ -352,18 +348,29 @@ message carrier_incentive_promotion_list_res_v1 {

service gateway {
// Get info for the specified gateway
rpc info(gateway_info_req_v1) returns (gateway_info_res_v1);
rpc info(gateway_info_req_v1) returns (gateway_info_res_v1) {
option deprecated = true;
}
// Get info for a batch of gateways specified by public key
rpc info_batch(gateway_info_batch_req_v1)
returns (stream gateway_info_stream_res_v1);
returns (stream gateway_info_stream_res_v1) {
option deprecated = true;
}
// Get a stream of gateway info
rpc info_stream(gateway_info_stream_req_v1)
returns (stream gateway_info_stream_res_v1) {
option deprecated = true;
}

// V2
// Get info for the specified gateway (V2)
rpc info_v2(gateway_info_req_v1) returns (gateway_info_res_v2);
// Get a stream of gateway info (V2)
rpc info_stream_v2(gateway_info_stream_req_v2)
returns (stream gateway_info_stream_res_v2);
// Get info for a batch of gateways specified by public key (V2)
rpc info_batch_v2(gateway_info_batch_req_v1)
returns (stream gateway_info_stream_res_v2);
}

service entity {
Expand Down

0 comments on commit b4c8c8f

Please sign in to comment.