aggregator

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run[T any](collector CollectorFunc[T], renderer RendererFunc[T], workspaces []string) error

Run executes a collector function across all workspaces and renders the results

func RunWithErrors

func RunWithErrors[T any](collector CollectorFunc[T], renderer func(map[string]WorkspaceResult[T]) error, rootDir string, workspaces []string) error

RunWithErrors is like Run but includes workspaces with errors in the results

Types

type CollectorFunc

type CollectorFunc[T any] func(workspacePath string, workspaceName string) (T, error)

CollectorFunc is a function that collects data for a single workspace

type RendererFunc

type RendererFunc[T any] func(results map[string]T) error

RendererFunc is a function that renders the aggregated results

type WorkspaceResult

type WorkspaceResult[T any] struct {
	Name  string
	Path  string
	Data  T
	Error error
}

WorkspaceResult holds the result from a single workspace

Jump to

Keyboard shortcuts

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