-
Notifications
You must be signed in to change notification settings - Fork 28
Get a stream of gateway info (V4) #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -128,6 +128,28 @@ message gateway_info_v3 { | |||||||||||||||||||||||||||||
| uint64 num_location_asserts = 6; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| message gateway_info_v4 { | ||||||||||||||||||||||||||||||
| // The public key binary address and on-chain identity of the gateway | ||||||||||||||||||||||||||||||
| bytes address = 1; | ||||||||||||||||||||||||||||||
| // The gateway metadata | ||||||||||||||||||||||||||||||
| gateway_metadata_v3 metadata = 2; | ||||||||||||||||||||||||||||||
| // The asserted device type of the gateway | ||||||||||||||||||||||||||||||
| device_type_v2 device_type = 3; | ||||||||||||||||||||||||||||||
| // The Unix epoch timestamp (in seconds) when the gateway was first added to | ||||||||||||||||||||||||||||||
| // the database | ||||||||||||||||||||||||||||||
| uint64 created_at = 4; | ||||||||||||||||||||||||||||||
| // The Unix epoch timestamp (in seconds) when the gateway parameters were last | ||||||||||||||||||||||||||||||
| // updated. NOTE: This field is also updated when the location or owner | ||||||||||||||||||||||||||||||
| // changes. | ||||||||||||||||||||||||||||||
| uint64 updated_at = 5; | ||||||||||||||||||||||||||||||
| // Count of hotspot location changes | ||||||||||||||||||||||||||||||
| uint64 num_location_asserts = 6; | ||||||||||||||||||||||||||||||
| // The gateway's owner | ||||||||||||||||||||||||||||||
| string owner = 7; | ||||||||||||||||||||||||||||||
| // The Unix epoch timestamp (in seconds) when the owner was last changed | ||||||||||||||||||||||||||||||
| uint64 owner_changed_at = 8; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| message gateway_info_req_v1 { | ||||||||||||||||||||||||||||||
| // The public key address of the gateway to look up | ||||||||||||||||||||||||||||||
| bytes address = 1; | ||||||||||||||||||||||||||||||
|
|
@@ -208,6 +230,32 @@ message gateway_info_stream_req_v3 { | |||||||||||||||||||||||||||||
| uint64 min_location_changed_at = 6; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| message gateway_info_stream_req_v4 { | ||||||||||||||||||||||||||||||
| // max number of gateway info records in each message of the response stream | ||||||||||||||||||||||||||||||
| uint32 batch_size = 1; | ||||||||||||||||||||||||||||||
| // pubkey binary of the signing keypair | ||||||||||||||||||||||||||||||
| bytes signer = 2; | ||||||||||||||||||||||||||||||
| bytes signature = 3; | ||||||||||||||||||||||||||||||
| // Device types that will be returned in the response | ||||||||||||||||||||||||||||||
| // Returns all devices if empty | ||||||||||||||||||||||||||||||
| repeated device_type_v2 device_types = 4; | ||||||||||||||||||||||||||||||
| // The Unix epoch timestamp (in seconds). | ||||||||||||||||||||||||||||||
| // Filters the response based on the last time gateway parameter(s) was | ||||||||||||||||||||||||||||||
| // updated (Includes location and owner changing). | ||||||||||||||||||||||||||||||
| // Use 0 if you don't want to apply this filter | ||||||||||||||||||||||||||||||
| // NOTE: It is recommended to use the highest `updated_at` field from | ||||||||||||||||||||||||||||||
| // returned radios in the next subsequent requests. | ||||||||||||||||||||||||||||||
| uint64 min_updated_at = 5; | ||||||||||||||||||||||||||||||
| // The Unix epoch timestamp (in seconds). | ||||||||||||||||||||||||||||||
| // Filters the response based on the last time gateway changed its location. | ||||||||||||||||||||||||||||||
| // Use 0 if you don't want to apply this filter | ||||||||||||||||||||||||||||||
|
Comment on lines
+245
to
+251
|
||||||||||||||||||||||||||||||
| // Use 0 if you don't want to apply this filter | |
| // NOTE: It is recommended to use the highest `updated_at` field from | |
| // returned radios in the next subsequent requests. | |
| uint64 min_updated_at = 5; | |
| // The Unix epoch timestamp (in seconds). | |
| // Filters the response based on the last time gateway changed its location. | |
| // Use 0 if you don't want to apply this filter | |
| // Use 0 to fetch all gateways. | |
| // NOTE: It is recommended to use the highest `updated_at` field from | |
| // returned radios in the next subsequent requests. | |
| uint64 min_updated_at = 5; | |
| // The Unix epoch timestamp (in seconds). | |
| // Filters the response based on the last time gateway changed its location. | |
| // Use 0 to fetch all gateways. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a discrepancy between the PR description and the code changes. The PR description states "Add owner and owner_changed_at to gateway_info_v3", but the code actually creates a new gateway_info_v4 message with these fields, leaving gateway_info_v3 unchanged. This is the correct approach for maintaining backward compatibility, but the PR description should be updated to reflect that this creates a V4 version rather than modifying V3.