Documentation ¶
Index ¶
- Variables
- func AddShutdownCallback(f func())
- func GetGoID() int64
- func GracefulRun(f func(ctx context.Context))
- func GracefulRunSync(f func(ctx context.Context))
- func SafeCall(f func())
- func SafeGo(f func())
- func SetInterval(fn func(), d time.Duration)
- func Wait(timeout time.Duration) error
- type Context
- type Singleton
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrGracefulShutdownTimeout = errors.New("graceful shutdown timeout")
)
Functions ¶
func GracefulRunSync ¶
GracefulRunSync 同步执行一个优雅停机函数
Types ¶
Click to show internal directories.
Click to hide internal directories.