Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoWithRecovery ¶
func GoWithRecovery(goroutine func(), customRecover func(args ...any))
GoWithRecovery create goroutine with custom recover function
Types ¶
type NoCopy ¶
type NoCopy struct{}
NoCopy prohibits the copying of struct objects sample: type Foo struct { noCopy } a go vet grammar check will prompt a warning
type TaskManager ¶
type TaskManager interface { io.Closer // Ctx get base context from TaskManger Ctx() context.Context // GoCtx start goroutine with context GoCtx(goroutine func(ctx context.Context)) }
TaskManager this Interface is designed to manage single-run tasks in the system the purpose of the design is to facilitate the unified management of coroutine and avoid its leakage all coroutine should be exited after CTX is cleared by cancel
func NewTaskManager ¶
func NewTaskManager(parentCtx context.Context) TaskManager
NewTaskManager create new task manager with context
Click to show internal directories.
Click to hide internal directories.