Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastCh ¶
type BroadcastCh chan struct{}
func NewBroadcastCh ¶
func NewBroadcastCh() BroadcastCh
func SetupSignalHandler ¶
func SetupSignalHandler() BroadcastCh
SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned which is closed on one of these signals. If a second signal is caught, the program is terminated with exit code 1.
func (BroadcastCh) Broadcast ¶
func (bc BroadcastCh) Broadcast()
func (BroadcastCh) Wait ¶
func (bc BroadcastCh) Wait()
type RunFunc ¶
type RunFunc func(BroadcastCh)
type RunWrapper ¶
type RunWrapper struct {
// contains filtered or unexported fields
}
func Run ¶
func Run(rfs ...RunFunc) *RunWrapper
func (*RunWrapper) Stop ¶
func (rw *RunWrapper) Stop()
func (*RunWrapper) StopAndWait ¶
func (rw *RunWrapper) StopAndWait()
func (*RunWrapper) Wait ¶
func (rw *RunWrapper) Wait()
Click to show internal directories.
Click to hide internal directories.