execution

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteParallel

func ExecuteParallel(ctx context.Context, requests []Request) error

ExecuteParallel executes a slice of requests in parallel

Types

type Request

type Request interface {
	Process(ctx context.Context) error
}

Request is input for parallel execution

type RequestResponse

type RequestResponse struct {
	Request  Request
	Response *Response
}

RequestResponse is used to combine both request and response in output

type Response

type Response struct {
	Value interface{}
	Err   error
}

Response is returned from parallel execution

Jump to

Keyboard shortcuts

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