Documentation ¶
Index ¶
- Variables
- type AsyncResult
- func (asyncResult *AsyncResult) Get(sleepDuration time.Duration) ([]reflect.Value, error)
- func (asyncResult *AsyncResult) GetState() *tasks.TaskState
- func (asyncResult *AsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)
- func (asyncResult *AsyncResult) Touch() ([]reflect.Value, error)
- type ChainAsyncResult
- type ChordAsyncResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBackendNotConfigured ... ErrBackendNotConfigured = errors.New("Result backend not configured") // ErrTimeoutReached ... ErrTimeoutReached = errors.New("Timeout reached") )
Functions ¶
This section is empty.
Types ¶
type AsyncResult ¶
AsyncResult represents a task result
func NewAsyncResult ¶
func NewAsyncResult(signature *tasks.Signature, backend iface.Backend) *AsyncResult
NewAsyncResult creates AsyncResult instance
func (*AsyncResult) GetState ¶
func (asyncResult *AsyncResult) GetState() *tasks.TaskState
GetState returns latest task state
func (*AsyncResult) GetWithTimeout ¶
func (asyncResult *AsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)
GetWithTimeout returns task results with a timeout (synchronous blocking call)
type ChainAsyncResult ¶
type ChainAsyncResult struct {
// contains filtered or unexported fields
}
ChainAsyncResult represents a result of a chain of tasks
func NewChainAsyncResult ¶
func NewChainAsyncResult(tasks []*tasks.Signature, backend iface.Backend) *ChainAsyncResult
NewChainAsyncResult creates ChainAsyncResult instance
func (*ChainAsyncResult) GetWithTimeout ¶
func (chainAsyncResult *ChainAsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)
GetWithTimeout returns results of a chain of tasks with timeout (synchronous blocking call)
type ChordAsyncResult ¶
type ChordAsyncResult struct {
// contains filtered or unexported fields
}
ChordAsyncResult represents a result of a chord
func NewChordAsyncResult ¶
func NewChordAsyncResult(groupTasks []*tasks.Signature, chordCallback *tasks.Signature, backend iface.Backend) *ChordAsyncResult
NewChordAsyncResult creates ChordAsyncResult instance
func (*ChordAsyncResult) GetWithTimeout ¶
func (chordAsyncResult *ChordAsyncResult) GetWithTimeout(timeoutDuration, sleepDuration time.Duration) ([]reflect.Value, error)
GetWithTimeout returns result of a chord with a timeout (synchronous blocking call)
Click to show internal directories.
Click to hide internal directories.