batchfuture

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchFuture

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

BatchFuture is an implementation of public BatchFuture interface.

func NewBatchFuture

func NewBatchFuture(ctx workflow.Context, batchSize int, factories []func(ctx workflow.Context) workflow.Future) (*BatchFuture, error)

func (*BatchFuture) Get

func (b *BatchFuture) Get(ctx workflow.Context, valuePtr interface{}) error

Get assigns the result of the futures to the valuePtr. NOTE: valuePtr must be a pointer to a slice, or nil. If valuePtr is a pointer to a slice, the slice will be resized to the length of the futures. Each element of the slice will be assigned with the underlying Future.Get() and thus behaves the same way. If valuePtr is nil, no assignment will be made. If error occurs, values will be set on successful futures and the errors of failed futures will be returned.

func (*BatchFuture) GetFutures

func (b *BatchFuture) GetFutures() []workflow.Future

func (*BatchFuture) IsReady

func (b *BatchFuture) IsReady() bool

Jump to

Keyboard shortcuts

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