Documentation ¶
Index ¶
- type DelayTaskFunc
- type OnTaskCompleted
- type OnTaskFailed
- type SWorkManager
- func (w *SWorkManager) DelayTask(ctx context.Context, task DelayTaskFunc, params interface{})
- func (w *SWorkManager) DelayTaskWithWorker(ctx context.Context, task DelayTaskFunc, params interface{}, ...)
- func (w *SWorkManager) DelayTaskWithoutReqctx(ctx context.Context, task DelayTaskFunc, params interface{})
- func (w *SWorkManager) Stop()
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 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()
Click to show internal directories.
Click to hide internal directories.