l7e.io/yama (go): Package yama provides a signal watcher that can be used to shutdown an application.  A signal watcher can be constructed to watch any number of signals and will call any number of registered io.Closer instances, when such signals occur; the results of calling Close() on the registered instances are ignored.  An application can wait fir the completion of the Closer notifications by calling the blocking method, Wait().  Here, the caller will be blocked until one of the signals occur and all the Closer notifications have either completed or two seconds have elapsed since the start of Closer notifications; the timeout is set above by passing yama.WithTimeout().  Subsequent signals will not trigger Closer notifications.  The application can programmatically trigger Closer notifications by calling  If this is done, subsequent signals will not trigger Closer notifications.  There are a few helper methods, FnAsCloser() and ErrValFnAsCloser(), that can be used to wrap simple functions and functions that can return an error, respectively, into instances that implement io.Closer.
Keywords: go|shutdown|signals