-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
agent: Send last billing/scaling events before shutdown
Follow-up to #1107, ref #1220. Basically, this change adds support into 'pkg/reporting' (which the autoscaler-agent uses for billing and scaling events) to cleanly send all remaining events on shutdown. This has three pieces: 1. The event sender threads now send and exit when their context expires; 2. reporting.NewEventSink() now takes a parent context (or .Finish() can be called instead to explicitly trigger a clean exit); and 3. reporting.NewEventSink() now spawns the senders with a taskgroup.Group passed in by the caller, so that shutdown of the entire autoscaler-agent will wait for sending to complete.
- Loading branch information
Showing
5 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters