Documentation ¶
Index ¶
- func Close()
- func Closers() basics.Peripheral
- func ClosersClosers() []basics.Peripheral
- func RegisterCloseFns(fns ...func())
- func RegisterPeripheral(servers ...basics.Peripheral)
- func SetupCloseHandlerAndEnterLoop(closers ...basics.Peripheral)
- func SetupCloseHandlerAndWait(wg *sync.WaitGroup, closers ...basics.Peripheral)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close()
Close will cleanup all registered closers. You must make a call to Close before your app shutting down. For example:
func main() { defer closers.Close() // ... }
func Closers ¶
func Closers() basics.Peripheral
Closers returns the closers set as a basics.Peripheral
func ClosersClosers ¶
func ClosersClosers() []basics.Peripheral
ClosersClosers returns the closers set as a basics.Peripheral array
func RegisterCloseFns ¶
func RegisterCloseFns(fns ...func())
RegisterCloseFns adds a simple closure into our global closers set
func RegisterPeripheral ¶
func RegisterPeripheral(servers ...basics.Peripheral)
RegisterPeripheral adds a peripheral into our global closers set. a basics.Peripheral object is a closable instance.
func SetupCloseHandlerAndEnterLoop ¶
func SetupCloseHandlerAndEnterLoop(closers ...basics.Peripheral)
func SetupCloseHandlerAndWait ¶
func SetupCloseHandlerAndWait(wg *sync.WaitGroup, closers ...basics.Peripheral)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.