execute

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package execute

Package execute

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// ClearTask 清除已有任务
	ClearTask() error
	// AddTask 添加需要执行的任务,函数必须为:executorFunc
	AddTask(f executorFunc, param ...interface{}) Executor
	// AddSimpleTask 推荐此方法,
	// 添加任务,函数格式必须为:taskfunc(param ...interface{}) (interface{}, error) or 自定义参数 taskfunc(i int, s string, arr []int) (interface{}, error)
	AddSimpleTask(f interface{}, param ...interface{}) Executor
	// ExecuteTask 执行任务,返回任务结果,不返回任务error以及执行error
	ExecuteTask() ([]interface{}, error)
	// ExecuteTaskWithErr 执行任务,返回任务结果和任务error以及执行error
	ExecuteTaskWithErr() ([]interface{}, []error, error)
}

func NewExecutor

func NewExecutor(taskName string) Executor

Jump to

Keyboard shortcuts

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