cleanup

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cleanup 提供取消安全但有上限的收尾 context。

业务请求取消后,数据库回滚、租约收尾和幂等结果落库仍应尽力完成, 但不能用无限期的 context.WithoutCancel 把连接或 goroutine 永久拖住。

Index

Constants

View Source
const Timeout = 5 * time.Second

Timeout 是框架内部收尾操作的统一最大预算。

Variables

This section is empty.

Functions

func Context

func Context(parent context.Context) (context.Context, context.CancelFunc)

Context 忽略 parent 的取消/原 deadline,同时给收尾操作一个独立上限。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL