Skip to content

refactor: extract interfaces for testability and improve polling architecture#7

Merged
arvarik merged 1 commit intomainfrom
refactor/interface-extraction-testability
Feb 23, 2026
Merged

refactor: extract interfaces for testability and improve polling architecture#7
arvarik merged 1 commit intomainfrom
refactor/interface-extraction-testability

Conversation

@arvarik
Copy link
Owner

@arvarik arvarik commented Feb 23, 2026

  • Extract EeroClient and MetricWriter interfaces for dependency injection
  • Add EeroClientAdapter to wrap *eero.Client at the application boundary
  • Refactor Poller.Start() to use per-tier goroutines (prevents cross-tier blocking)
  • Move session file path from auth init() to Config.EeroSessionPath (env var overridable)
  • Fix variable shadowing in poll closures (var retryErr)
  • Fix hugeParam lint: resolveDeviceName takes *eero.Device
  • Fix rangeValCopy lint: index-based range loops for large structs
  • Use structured slog fields instead of fmt.Sprintf
  • Add mock-based Poller.Start() test with channel synchronization
  • Document EERO_SESSION_PATH in .env.example

…itecture

- Extract EeroClient and MetricWriter interfaces for dependency injection
- Add EeroClientAdapter to wrap *eero.Client at the application boundary
- Refactor Poller.Start() to use per-tier goroutines (prevents cross-tier blocking)
- Move session file path from auth init() to Config.EeroSessionPath (env var overridable)
- Fix variable shadowing in poll closures (var retryErr)
- Fix hugeParam lint: resolveDeviceName takes *eero.Device
- Fix rangeValCopy lint: index-based range loops for large structs
- Use structured slog fields instead of fmt.Sprintf
- Add mock-based Poller.Start() test with channel synchronization
- Document EERO_SESSION_PATH in .env.example
@arvarik arvarik changed the title refactor: extract interfaces for testability and improve polling arch… refactor: extract interfaces for testability and improve polling architecture Feb 23, 2026
@arvarik arvarik merged commit cd023db into main Feb 23, 2026
1 check passed
@arvarik arvarik deleted the refactor/interface-extraction-testability branch February 23, 2026 05:24
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.

1 participant