Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListenerFunc ¶
func (ListenerFunc) OnShutdown ¶
func (f ListenerFunc) OnShutdown(ctx context.Context) error
type Shutdown ¶
type Shutdown struct {
// contains filtered or unexported fields
}
func (*Shutdown) Wait ¶
Wait receive an message that will be printed out to logger before blocking. Wait block the call and wait for SIGINT, SIGTERM or SIGHUP signals. After signal is received, this method will run Listener.OnShutdown in parallel, the operation must complete under specified timeout. If any listeners return an error or operation is timed out this method will call os.Exit(1).
Click to show internal directories.
Click to hide internal directories.