Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotifyOnAppExitMessage ¶
func NotifyOnAppExitMessage(natsConnection NatsConnectionInterface, quitChannel chan os.Signal)
NotifyOnAppExitMessage subscribes to the AppExitTopic for the given NATS client. When a message is received, an os.Interrupt signal is sent using the given channel. This can then be used to exit the app 'gracefully', which is required for collecting code coverage reports generated via 'go test'.
WARNING: this function should only be used during testing (generally for the purposes of collecting coverage, as explained above).
func NotifyOnAppExitMessageGeneric ¶
NotifyOnAppExitMessageGeneric does the same thing as NotifyOnAppExitMessage but allows using the generic interface defined in this repository.
Types ¶
type NatsConnectionInterface ¶
Click to show internal directories.
Click to hide internal directories.