This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 330
Sink Close()
method is never called
#10
Comments
mdemierre
added a commit
to mdemierre/kubernetes-event-exporter
that referenced
this issue
Dec 15, 2019
Before the change, the engine didn't call the `Close()` method of the sinks. This is needed in some cases, i.e when a sink implementation is buffered. This change adds a `Close()` method to the registry that will signal sinks to exit and wait for all sinks to exit before returning. In the channel-based registry, the closing of all sinks is done in parallel (using a `sync.WaitGroup`). In the sync registry, sinks are closed one after the other. Fixes issue opsgenie#10
mdemierre
added a commit
to mdemierre/kubernetes-event-exporter
that referenced
this issue
Dec 15, 2019
Before the change, the engine didn't call the `Close()` method of the sinks. This is needed in some cases, i.e when a sink implementation is buffered. This change adds a `Close()` method to the registry that will signal sinks to exit and wait for all sinks to exit before returning. This is then used in the engine stop logic. In the channel-based registry, the closing of all sinks is done in parallel (using a `sync.WaitGroup`). In the sync registry, sinks are closed sequentially. Fixes issue opsgenie#10
mdemierre
added a commit
to mdemierre/kubernetes-event-exporter
that referenced
this issue
Dec 15, 2019
Before the change, the engine didn't call the `Close()` method of the sinks. This is needed in some cases, i.e when a sink implementation is buffered. This change adds a `Close()` method to the registry that will signal sinks to exit and wait for all sinks to exit before returning. This is then used in the engine stop logic. In the channel-based registry, the closing of all sinks is done in parallel (using a `sync.WaitGroup`). In the sync registry, sinks are closed sequentially. Fixes issue opsgenie#10
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Whie implementing a new sink, I noticed that my
Close()
method was never called.I expected it to be called when sending SIGTERM to the process, and that it would be waited for before terminating.
The text was updated successfully, but these errors were encountered: