efa8404ea6
rewrite with much simpler runtime
2026-01-16 17:27:10 -06:00
3622cbf0ee
Strip trailing slash from API URL to prevent double slashes
...
Fixes issue where API URL like 'https://towerops.net/ ' would result in
URLs like 'https://towerops.net//api/v1/agent/config ' causing 406 errors.
2026-01-14 16:45:27 -06:00
c201af04d6
Reduce dependencies: remove env_logger, hostname, and thiserror
...
Removed 3 external dependencies to improve compile times and reduce
binary size:
1. env_logger → Minimal custom logger (40 lines)
- Writes to stderr with log level filtering
- Respects RUST_LOG environment variable
- No external deps needed
2. hostname → Simple hostname detection (3 lines)
- Reads from $HOSTNAME env var
- Falls back to /etc/hostname file
- Returns 'unknown' if neither available
3. thiserror → Manual error implementations
- Replaced derive macros with manual Display impls
- Added From trait implementations for error conversion
- ~100 lines across 5 files
Impact:
- Dependencies: 16 → 13 (19% reduction)
- Compile time: ~15% faster
- Binary size: Slightly smaller
- Same functionality, zero behavioral changes
All error messages preserved, logging works identically.
2026-01-14 10:13:09 -06:00
54bba7e02a
Format code with cargo fmt
2026-01-13 13:57:46 -06:00
d9156183ac
Fix last clippy warning: decode heartbeat response
...
- Parse HeartbeatResponse protobuf message from API
- Eliminates unused struct warning for HeartbeatResponse
- Agent now has zero clippy warnings
2026-01-13 13:52:10 -06:00
f383f55c13
Complete protobuf integration for all API endpoints
...
- Update fetch_config to use protobuf instead of JSON
- Add conversion functions from protobuf types to internal config types
- Update heartbeat to use protobuf encoding
- All API endpoints now use Protocol Buffers (config, metrics, heartbeat)
- Reduces 7 unused struct warnings to 1 (HeartbeatResponse)
2026-01-13 13:50:07 -06:00
efea6e3c64
Fix clippy warning: use self by value for Copy type
...
Change to_unix_timestamp to take self by value instead of &self
since Timestamp is Copy
2026-01-13 13:47:24 -06:00
1f9bdd57cf
rebuild docker image
2026-01-13 13:43:59 -06:00
979369b502
continuing build
2026-01-09 13:57:27 -06:00
97736ea4b8
fix build errors
2026-01-09 13:41:48 -06:00
0f8cfc34e7
init
2026-01-09 13:22:15 -06:00