errors

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 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 Pipeline

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

Pipeline 使用 errgroup 的链式管道多错误处理

func NewPipeline

func NewPipeline() *Pipeline

func NewPipelineWithContext

func NewPipelineWithContext(ctx context.Context) *Pipeline

func (*Pipeline) Context

func (p *Pipeline) Context() context.Context

Context 获取上下文

func (*Pipeline) Execute

func (p *Pipeline) Execute() error

Execute 顺序执行所有函数(遇到错误立即停止)

func (*Pipeline) ExecuteParallel

func (p *Pipeline) ExecuteParallel() error

ExecuteParallel 并发执行所有函数

func (*Pipeline) ExecuteParallelWithLimit

func (p *Pipeline) ExecuteParallelWithLimit(limit int) error

ExecuteParallelWithLimit 限制并发数量执行

func (*Pipeline) Then

func (p *Pipeline) Then(fn ...func() error) *Pipeline

Then 添加一个函数到管道中

Jump to

Keyboard shortcuts

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