Documentation ¶
Index ¶
- func Retry(attempts int, sleep int, fn func() (error, bool)) (err error)
- type LifeCycle
- func (l *LifeCycle) AddCloseFunc(f func() error)
- func (l *LifeCycle) AddCloser(clr io.Closer)
- func (l *LifeCycle) C() <-chan struct{}
- func (l *LifeCycle) Context() context.Context
- func (l *LifeCycle) Exit()
- func (l *LifeCycle) SetSignals(sigs ...os.Signal)
- func (l *LifeCycle) SetTimeout(d time.Duration)
- func (l *LifeCycle) WaitExit()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LifeCycle ¶
type LifeCycle struct {
// contains filtered or unexported fields
}
LifeCycle 应用程序生命周期
func (*LifeCycle) AddCloseFunc ¶
AddCloseFunc 添加退出任务
func (*LifeCycle) SetSignals ¶
SetSignals 设置监听的信号量
Click to show internal directories.
Click to hide internal directories.