run

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package run provides primitives for running concurrent components as a unified group.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(ctx context.Context) error

Func defines a runnable component function.

type Group

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

Group coordinates the execution of multiple concurrent components.

func (*Group) Add

func (g *Group) Add(name string, fn Func)

Add registers a named component to the group.

func (*Group) Run

func (g *Group) Run(ctx context.Context) error

Run executes all components concurrently. If any component returns, the context is canceled for all remaining components and Run waits for all to exit.

Jump to

Keyboard shortcuts

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