task

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TFunc

type TFunc struct {
	Func func(task *Task)
}

type Task

type Task struct {
	Closed chan bool
	Wg     sync.WaitGroup
	Logger *zap.Logger
}

func (*Task) AddFunc

func (t *Task) AddFunc(f TFunc)

AddFunc 新增运行方法

func (*Task) Run

func (t *Task) Run()

Run 运行所有任务

func (*Task) RunListener

func (t *Task) RunListener()

RunListener 启动系统监听退出信号

func (*Task) Stop

func (t *Task) Stop()

Stop 优雅退出所有任务

Jump to

Keyboard shortcuts

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