result

package
Version: v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

type AsyncResult struct {
	Signature *tasks.Signature
	// contains filtered or unexported fields
}

AsyncResult represents a task result

func NewAsyncResult

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

NewAsyncResult creates AsyncResult instance

func (*AsyncResult) Get

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

Get returns task results (synchronous blocking call)

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)

func (*AsyncResult) Touch

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

Touch the state and don't wait

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) Get

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

Get returns results of a chain of tasks (synchronous blocking call)

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) Get

func (chordAsyncResult *ChordAsyncResult) Get(sleepDuration time.Duration) ([]reflect.Value, error)

Get returns result of a chord (synchronous blocking call)

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)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL