progress

package
v0.16.15 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	RunSequential(ctx context.Context, tasks []Task) error
	// RunParallel runs tasks concurrently; concurrency 0 uses runtime.NumCPU().
	RunParallel(ctx context.Context, tasks []Task, concurrency int) error
}

Dispatcher schedules and coordinates Tasks.

type ProgressReporter

type ProgressReporter interface {
	Report(event ingitdb.ProgressEvent)
}

ProgressReporter receives events from the dispatcher. Goroutine-safe; must not block.

type Signal

type Signal int

Signal is a user-initiated control action.

const (
	SignalNone      Signal = iota
	SignalSkipItem         // skip current record/view, continue
	SignalAbort            // cancel entire operation
	SignalDrillDown        // request detail display (TUI only)
)

type Steerer

type Steerer interface {
	Steer() Signal
}

Steerer emits control signals from the TUI into the dispatcher. Goroutine-safe; Steer() resets the signal to SignalNone on read.

type Task

type Task interface {
	Name() string
	Run(ctx context.Context, reporter ProgressReporter, steerer Steerer) error
}

Task is a unit of work the dispatcher schedules.

Jump to

Keyboard shortcuts

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