internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelIterImpl

type ChannelIterImpl[T any] struct {
	Pipe <-chan T

	Error error
	// contains filtered or unexported fields
}

func (*ChannelIterImpl[T]) Close

func (iter *ChannelIterImpl[T]) Close(_ context.Context) error

func (*ChannelIterImpl[T]) Next

func (iter *ChannelIterImpl[T]) Next(ctx context.Context) bool

func (*ChannelIterImpl[T]) Value

func (iter *ChannelIterImpl[T]) Value() T

type MapIterImpl

type MapIterImpl[T any] struct {
	ChannelIterImpl[T]
	WG     WaitGroup
	Closer context.CancelFunc
}

func (*MapIterImpl[T]) Close

func (iter *MapIterImpl[T]) Close(ctx context.Context) error

type SliceIterImpl

type SliceIterImpl[T any] struct {
	Vals  []T
	Index int
	// contains filtered or unexported fields
}

func (*SliceIterImpl[T]) Close

func (iter *SliceIterImpl[T]) Close(_ context.Context) error

func (*SliceIterImpl[T]) Next

func (iter *SliceIterImpl[T]) Next(ctx context.Context) bool

func (*SliceIterImpl[T]) Value

func (iter *SliceIterImpl[T]) Value() T

type WaitGroup

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

WaitGroup is a simple wrapper around sync.WaitGroup, but has a Wait function that respects a context.

func (*WaitGroup) Add

func (wg *WaitGroup) Add(n int)

func (*WaitGroup) Done

func (wg *WaitGroup) Done()

func (*WaitGroup) Wait

func (wg *WaitGroup) Wait(ctx context.Context)

Wait returns when the all waiting items are done, *or* the context is canceled. This operation will leak a go routine if the WaitGroup never returns and the context is canceled.

Jump to

Keyboard shortcuts

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