timertask

package
v0.0.0-...-ee7ecfe Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

* 通用的全局定时任务管理器 未实现任务持久化

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimerTask

type TimerTask struct {
	// contains filtered or unexported fields
}

任务

type TimerTaskFunc

type TimerTaskFunc func(args ...interface{})

type TimerTaskManager

type TimerTaskManager struct {
	// contains filtered or unexported fields
}

定时任务管理器

func NewTimerTaskManager

func NewTimerTaskManager() *TimerTaskManager

创建一个定时任务管理器

func (*TimerTaskManager) AddTask

func (manager *TimerTaskManager) AddTask(t time.Time, key string, exec TimerTaskFunc, params []interface{}) error

添加任务

func (*TimerTaskManager) Close

func (manager *TimerTaskManager) Close()

停止

func (*TimerTaskManager) Start

func (manager *TimerTaskManager) Start()

启动

Jump to

Keyboard shortcuts

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