Commit Graph

8 Commits

Author SHA1 Message Date
63ef233357 add consolidated methods, update cli 2026-01-19 11:50:51 -05:00
5e8e7cd41d refactor CLI to use shared clients from context
- Add Login() method to toughswitch and edgeos clients
- Use zerolog's built-in context methods for logger storage
- Add context helpers for toughswitch/edgeos clients
- Create prepareClients prerun to initialize clients from config
- Consolidate device fetching into shared client.go helper

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 17:03:35 -05:00
b21475b487 move to ubiquiti-clients, add edgeos 2026-01-14 11:11:34 -05:00
195a9f7a9f rename to toughswitch
All checks were successful
Publish / release (push) Successful in 29s
2026-01-05 16:25:23 -05:00
438d422b53 rename to toughswitch 2026-01-05 15:47:43 -05:00
1754eb6e84 Add thread-safe Add/Del methods and refactor client locking
- Add Add and Del methods to Client for dynamic host management.
- Add RWMutex to Client to protect the devices map.
- Add Transport to Config to allow mocking HTTP transport in tests.
- Add getDeviceByHost helper to centralize device lookup locking.
- Refactor GetAll* methods to snapshot host keys before iteration to avoid concurrent map read/write panic.
- Add tests for thread safety and Add/Del functionality.
2026-01-04 13:56:19 -05:00
906d005edf improves concurrent GetAll operations 2026-01-04 13:49:28 -05:00
e0c0321bc9 Ubiquiti EdgeOS Go Client 2026-01-04 13:26:40 -05:00