workmanager

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelayTaskFunc

type DelayTaskFunc func(context.Context, interface{}) (jsonutils.JSONObject, error)

type OnTaskCompleted

type OnTaskCompleted func(context.Context, jsonutils.JSONObject)

type OnTaskFailed

type OnTaskFailed func(context.Context, string)

type SWorkManager

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

func NewWorkManger

func NewWorkManger(onFailed OnTaskFailed, onCompleted OnTaskCompleted, workerCount int) *SWorkManager

func (*SWorkManager) DelayTask

func (w *SWorkManager) DelayTask(ctx context.Context, task DelayTaskFunc, params interface{})

func (*SWorkManager) DelayTaskWithWorker

func (w *SWorkManager) DelayTaskWithWorker(
	ctx context.Context, task DelayTaskFunc, params interface{}, worker *appsrv.SWorkerManager,
)

func (*SWorkManager) DelayTaskWithoutReqctx

func (w *SWorkManager) DelayTaskWithoutReqctx(ctx context.Context, task DelayTaskFunc, params interface{})

func (*SWorkManager) Stop

func (w *SWorkManager) Stop()

Jump to

Keyboard shortcuts

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