pool

package
v0.0.0-...-0cd90d5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatResult

func FormatResult(resultList []interface{}) *Reponse

func FuncCall

func FuncCall(function interface{}, args ...interface{}) []interface{}

Types

type CallBackFunc

type CallBackFunc struct {
	Function interface{}
	Params   []interface{}
	// contains filtered or unexported fields
}

type ExcelFunc

type ExcelFunc struct {
	Name     string
	Function interface{}
	Params   []interface{}
}

type Pool

type Pool struct {
	//mutex         sync.WaitGroup
	RuntineNumber int
	Total         int
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *Pool

func (*Pool) AddTask

func (this *Pool) AddTask(task *Queue)

func (*Pool) Init

func (this *Pool) Init(runtineNumber, total int) *Pool

func (*Pool) Start

func (this *Pool) Start()

func (*Pool) Stop

func (this *Pool) Stop()

func (*Pool) TaskResult

func (this *Pool) TaskResult() map[string]*Reponse

type Queue

type Queue struct {
	Name string

	Excel    *ExcelFunc
	CallBack *CallBackFunc
	// contains filtered or unexported fields
}

* 执行队列

func QueryInit

func QueryInit(name string, function interface{}, params ...interface{}) *Queue

func (*Queue) CallBackInit

func (q *Queue) CallBackInit(name string, function interface{}, params ...interface{}) *Queue

Jump to

Keyboard shortcuts

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