Skip to content

add cli to pull gateways that location has changed since given timestamp#1210

Open
bbalser wants to merge 1 commit into
mainfrom
bbalser/mobile-config-cli/location-changed
Open

add cli to pull gateways that location has changed since given timestamp#1210
bbalser wants to merge 1 commit into
mainfrom
bbalser/mobile-config-cli/location-changed

Conversation

@bbalser

@bbalser bbalser commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Add gateway location-changed-at CLI command to mobile-config-cli

Summary

Adds a new location-changed-at subcommand under mobile-config-cli gateway that streams all hotspots whose location changed at or after a given timestamp, using the gateway_info_stream_req_v4 RPC.

Usage

mobile-config-cli gateway location-changed-at --min-location-changed-at <UNIX_SECONDS> [--batch-size 5000]

Outputs pretty JSON with the filter value, a match count, and per-gateway details: name, pubkey, device_type, location/lat/lon, location_changed_at, num_location_asserts, created_at, updated_at, owner, owner_changed_at.

Changes

  • cmds/mod.rs — new LocationChangedAt command variant + args struct (--min-location-changed-at, optional --batch-size default 5000, global keypair/host/pubkey).
  • client.rs — new info_stream_v4 method on GatewayClient that builds, signs, and streams a GatewayInfoStreamReqV4 (min_location_changed_at set; other filters left at 0); registered impl_sign!/impl_verify! for the V4 req/res types.
  • cmds/gateway.rs — serializable GatewayInfoV4 summary with TryFrom<GatewayInfoV4Proto>, plus the location_changed_at handler.
  • main.rs — wired the new subcommand into dispatch.

Notes

  • Server filter semantics are "location changed at or after" the given timestamp (matches the proto's min_location_changed_at field).
  • cargo check and cargo clippy pass clean for mobile-config-cli.

@bbalser bbalser requested a review from michaeldjeffrey June 25, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants