task

package
v1.0.1-0...-e52dcc8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundTask

type BackgroundTask struct {
	Time1 time.Duration
	// contains filtered or unexported fields
}

func (*BackgroundTask) AddJob

func (b *BackgroundTask) AddJob(job Job)

AddJob 添加工作

func (*BackgroundTask) Run

func (b *BackgroundTask) Run() error

Run 运行后台任务

func (*BackgroundTask) Stop

func (b *BackgroundTask) Stop() error

Stop 停止后台任务

type Job

type Job func() error

*

  • Copyright (C) @2020 hugo network Co. Ltd
  • 后台任务
  • @author: hugo
  • @version: 1.0
  • @date: 2020/8/31
  • @time: 22:28
  • @description:

定义一个任务函数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳