concurrent

package
v0.0.0-...-4a61b4d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuffer

func NewBuffer(writer io.Writer) io.Writer

NewBuffer is used to create a new buffer

Types

type Buffer

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

Buffer is goroutine safety buffer

func (*Buffer) Write

func (s *Buffer) Write(p []byte) (n int, err error)

Write implements the io.Writer

type ErrGroup

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

ErrGroup is another ErrGroup implement

func NewErrGroup

func NewErrGroup(ctx context.Context, concurrency int) *ErrGroup

NewErrGroup is used to create a new ErrGroup

func (*ErrGroup) Go

func (g *ErrGroup) Go(f func(ctx context.Context) error)

Go is used to start a new goroutine

func (*ErrGroup) Wait

func (g *ErrGroup) Wait() error

Wait is used to wait ErrGroup finish

Jump to

Keyboard shortcuts

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