Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
func (*Module) GetGracefulShutdownContext ¶
func (*Module) Init ¶
Init the graceful module Usage: Wait should be called in the main function after Run
func main() { app := &App{} service.New(app).Run() app.Graceful.Wait() }
func (*Module) Loop ¶
Loop executes fn every `interval` until m.ctx is done (triggered by receiving a SIGTERM or SIGINT)
func (*Module) OnShutdown ¶
OnShutdown is a helper to run a shutdownFunc when m.ctx is cancelled
Click to show internal directories.
Click to hide internal directories.