result

package
v0.0.0-...-4f74120 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBackendEmpty = errors.New("backend is empty")

ErrBackendEmpty ...

Functions

This section is empty.

Types

type AsyncResult

type AsyncResult struct {
	Signature *task.Signature // Signature 任务签名
	// contains filtered or unexported fields
}

AsyncResult 异步结果

func NewAsyncResult

func NewAsyncResult(signature *task.Signature, backend backend.Backend) *AsyncResult

NewAsyncResult 创建异步任务返回结果

func (*AsyncResult) Get

func (asyncResult *AsyncResult) Get(sleepDuration time.Duration) ([]reflect.Value, error)

Get 返回结果

func (*AsyncResult) GetState

func (asyncResult *AsyncResult) GetState() *task.Status

GetState 获取任务状态

func (*AsyncResult) GetWithTimeout

func (asyncResult *AsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)

GetWithTimeout 返回结果 带有超时时间

func (*AsyncResult) Monitor

func (asyncResult *AsyncResult) Monitor() ([]reflect.Value, error)

Monitor 监视任务

type ChainAsyncResult

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

ChainAsyncResult 链式调用任务结果返回

func NewChainAsyncResult

func NewChainAsyncResult(chainAsyncResult []*task.Signature, backend backend.Backend) *ChainAsyncResult

NewChainAsyncResult 创建链式调用任务返回结果

func (*ChainAsyncResult) Get

func (chainAsyncResult *ChainAsyncResult) Get(sleepDuration time.Duration) ([]reflect.Value, error)

Get 返回结果

func (*ChainAsyncResult) GetWithTimeout

func (chainAsyncResult *ChainAsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)

GetWithTimeout 返回结果 带有超时时间

type GroupCallbackAsyncResult

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

GroupCallbackAsyncResult 具有回调任务的个任务组异步结果

func NewGroupCallbackAsyncResult

func NewGroupCallbackAsyncResult(groupAsyncResult []*task.Signature, callbackAsyncResult *task.Signature, backend backend.Backend) *GroupCallbackAsyncResult

NewGroupCallbackAsyncResult 创建具有回调任务组的异步返回结果

func (*GroupCallbackAsyncResult) Get

func (groupCallbackAsyncResult *GroupCallbackAsyncResult) Get(sleepDuration time.Duration) ([]reflect.Value, error)

Get 返回结果

func (*GroupCallbackAsyncResult) GetWithTimeout

func (groupCallbackAsyncResult *GroupCallbackAsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)

GetWithTimeout 返回结果 带有超时时间

Jump to

Keyboard shortcuts

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