Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithContext ¶
WithContext allows to pass a context.
func WithLogger ¶
WithLogger injects a service implementing Logger.
func WithSignals ¶
WithSignals listen to given os.Signal as shutdown trigger.
func WithTimeExpiration ¶
WithTimeExpiration set a timeout for shutdown functions.
type Shutdown ¶
type Shutdown struct { Option // contains filtered or unexported fields }
func (*Shutdown) Register ¶
Register a collection of Closable functions that will be gracefully closed.
func (*Shutdown) RunGraceful ¶
func (s *Shutdown) RunGraceful(fn func())
RunGraceful shutdown of given function.
Click to show internal directories.
Click to hide internal directories.