Skip to content

Commit 21e2ba9

Browse files
committed
Get a stream of gateway info (V4)
1 parent 3dbaedf commit 21e2ba9

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

src/service/mobile_config.proto

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,28 @@ message gateway_info_v3 {
128128
uint64 num_location_asserts = 6;
129129
}
130130

131+
message gateway_info_v4 {
132+
// The public key binary address and on-chain identity of the gateway
133+
bytes address = 1;
134+
// The gateway metadata
135+
gateway_metadata_v3 metadata = 2;
136+
// The asserted device type of the gateway
137+
device_type_v2 device_type = 3;
138+
// The Unix epoch timestamp (in seconds) when the gateway was first added to
139+
// the database
140+
uint64 created_at = 4;
141+
// The Unix epoch timestamp (in seconds) when the gateway parameters were last
142+
// updated. NOTE: This field is also updated when the location or owner
143+
// changes.
144+
uint64 updated_at = 5;
145+
// Count of hotspot location changes
146+
uint64 num_location_asserts = 6;
147+
// The gateway's owner
148+
string owner = 7;
149+
// The last time the owner was changed (in seconds)
150+
uint64 owner_changed_at = 8;
151+
}
152+
131153
message gateway_info_req_v1 {
132154
// The public key address of the gateway to look up
133155
bytes address = 1;
@@ -208,6 +230,32 @@ message gateway_info_stream_req_v3 {
208230
uint64 min_location_changed_at = 6;
209231
}
210232

233+
message gateway_info_stream_req_v4 {
234+
// max number of gateway info records in each message of the response stream
235+
uint32 batch_size = 1;
236+
// pubkey binary of the signing keypair
237+
bytes signer = 2;
238+
bytes signature = 3;
239+
// Device types that will be returned in the response
240+
// Use empty array if you don't want to apply this filter
241+
repeated device_type_v2 device_types = 4;
242+
// The Unix epoch timestamp (in seconds).
243+
// Filters the response based on the last time gateway parameter(s) was
244+
// updated (Includes location and owner changing).
245+
// Use 0 if you don't want to apply this filter
246+
// NOTE: It is recommended to use the highest `updated_at` field from
247+
// returned radios in the next subsequent requests.
248+
uint64 min_updated_at = 5;
249+
// The Unix epoch timestamp (in seconds).
250+
// Filters the response based on the last time gateway changed its location.
251+
// Use 0 if you don't want to apply this filter
252+
uint64 min_location_changed_at = 6;
253+
// The Unix epoch timestamp (in seconds).
254+
// Filters the response based on the last time gateway's owner was changed
255+
// Use 0 if you don't want to apply this filter
256+
uint64 min_owner_changed_at = 7;
257+
}
258+
211259
message gateway_info_stream_req_v2 {
212260
// max number of gateway info records in each message of the response stream
213261
uint32 batch_size = 1;
@@ -255,6 +303,16 @@ message gateway_info_stream_res_v3 {
255303
bytes signature = 4;
256304
}
257305

306+
message gateway_info_stream_res_v4 {
307+
// a list of gateway info numbering up to the request batch size
308+
repeated gateway_info_v4 gateways = 1;
309+
// unix epoch timestamp in seconds
310+
uint64 timestamp = 2;
311+
// pubkey binary of the signing keypair
312+
bytes signer = 3;
313+
bytes signature = 4;
314+
}
315+
258316
message entity_verify_req_v1 {
259317
// binary identifier of the entity
260318
bytes entity_id = 1;
@@ -475,6 +533,11 @@ service gateway {
475533
// Get a stream of gateway info (V3)
476534
rpc info_stream_v3(gateway_info_stream_req_v3)
477535
returns (stream gateway_info_stream_res_v3);
536+
537+
// V4
538+
// Get a stream of gateway info (V4)
539+
rpc info_stream_v4(gateway_info_stream_req_v4)
540+
returns (stream gateway_info_stream_res_v4);
478541
}
479542

480543
service entity {

0 commit comments

Comments
 (0)