Documentation ¶
Index ¶
- Constants
- type Graceful
- func (that *Graceful) AddInherited(procFiles []*os.File, envs map[string]string)
- func (that *Graceful) GraceSignal()
- func (that *Graceful) Reboot(timeout ...time.Duration)
- func (that *Graceful) SetShutdown(timeout time.Duration, firstSweepFunc, beforeExitingFunc func() error)
- func (that *Graceful) Shutdown(timeout ...time.Duration)
Constants ¶
View Source
const MinShutdownTimeout = 15 * time.Second
MinShutdownTimeout 最小停止超时时间
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graceful ¶
type Graceful struct {
// contains filtered or unexported fields
}
func NewGraceful ¶
func NewGraceful() *Graceful
func (*Graceful) AddInherited ¶
AddInherited 添加需要给重启后新进程继承的文件句柄和环境变量
func (*Graceful) GraceSignal ¶
func (that *Graceful) GraceSignal()
Click to show internal directories.
Click to hide internal directories.