Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelFunc ¶
type CancelFunc func()
CancelFunc, if called, will disable the associated cleaner. This allow to create temporary cleaner. Be mindful though to not create too much of them as they are just disabled, not removed from memory.
func RegisterCleaner ¶
func RegisterCleaner(cleaner CleanerFunc) CancelFunc
RegisterCleaner is responsible for registering a cleaner function. When a function is registered, the Signal watcher is started in a goroutine.
type CleanerFunc ¶
type CleanerFunc func() error
CleanerFunc is a function to be executed when an interrupt trigger
Click to show internal directories.
Click to hide internal directories.