Propagate Context via Lifecycle Management #82

Closed
opened 2026-03-28 04:21:05 +00:00 by mfreeman451 · 0 comments
Owner

Imported from GitHub.

Original GitHub issue: #219
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/219
Original created: 2025-02-19T01:50:14Z


  • Use the server’s lifecycle context (passed via Server.Start) to manage the SNMPService lifecycle, ensuring it respects shutdown signals.

  • Pass a context to SNMPService.Start for lifecycle management.

  • Use a done channel in SNMPChecker to signal shutdown, avoiding any context-related fields in the struct.

  • Ensure the polling loop and status retrieval respect the context and channel signals cleanly.

  • For individual polls, use a short-lived, request-scoped context derived from the gRPC request, but decouple it from the long-running polling loop.

Imported from GitHub. Original GitHub issue: #219 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/219 Original created: 2025-02-19T01:50:14Z --- - [x] Use the server’s lifecycle context (passed via Server.Start) to manage the SNMPService lifecycle, ensuring it respects shutdown signals. - Pass a context to SNMPService.Start for lifecycle management. - Use a done channel in SNMPChecker to signal shutdown, avoiding any context-related fields in the struct. - Ensure the polling loop and status retrieval respect the context and channel signals cleanly. - [x] For individual polls, use a short-lived, request-scoped context derived from the gRPC request, but decouple it from the long-running polling loop.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar#82
No description provided.