Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GracefulExist ¶
type GracefulExist struct {
// contains filtered or unexported fields
}
func (*GracefulExist) Capture ¶
func (r *GracefulExist) Capture()
Capture capture program exit signal Suitable for k8s pod logout、docker container stop、program exit and etc.
func (*GracefulExist) DestroyHandle ¶
func (r *GracefulExist) DestroyHandle(name string)
DestroyHandle destroy handle after destroy, the handle will no longer be executed when the program exits
func (*GracefulExist) RegistryHandle ¶
func (r *GracefulExist) RegistryHandle(name string, handler Handler)
RegistryHandle register handle the handle will be automatically executed when the program exits
Click to show internal directories.
Click to hide internal directories.