group

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 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 Error

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

Error ...

func Append

func Append(err error, errs ...error) *Error

Append ...

func (*Error) Error

func (e *Error) Error() string

Error ...

type Func

type Func func(ctx context.Context) error

Func ...

type Run

type Run struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Run is an abstraction on WaitGroup to run multiple functions concurrently. It mimics 'errgroup' to extend structs with functions to run concurrently with a root context.

func (*Run) Run

func (g *Run) Run(ctx context.Context, fn Func)

Run is creating a new go routine to run a function concurrently.

func (*Run) Wait

func (g *Run) Wait() error

Wait is waiting for all go routines to finish.

Jump to

Keyboard shortcuts

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