-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eventstream: rework Client's channels
This change started by creating two separate channels for events from the Event Stream API and from the replay phase. During debugging, I came across multiple bugs, which are somewhat all addressed here. - I used buffered channels to pass events from the producers to the single dispatcher consumer, even as I should have known better. When the last replay producer has finished, another channel is used to communicate this state change. Because of my lazy buffered channel hack, the last events were raced by the finish signal. - After restoring (channel processing) order, the producers need a way to quickly exit when the consumer has finished. Thus, a both reading and writing switch - checking the context's Done channel - was introduced to all producers. - Some safeguard checks were introduced, which, e.g., detected the channel race error listed above. - Somehow during a prior refactoring, the Client.fetchServiceGroups method was broken to also query the host groups instead of, as its name says, the service groups. - My Docker-based testing environment sends SIGTERM instead of SIGINT, which, for other reasons, does not even reached the binary. Now SIGTERM is honored for the main context as well. - Some documentation especially regarding error messages had either typos or grammatically mistakes.
- Loading branch information
Showing
3 changed files
with
60 additions
and
43 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