Documentation ¶
Index ¶
- Variables
- func AggregateChannel[T any](ctx context.Context, inputStream <-chan T, f AggregateFunc[T]) <-chan T
- func Detach(ctx context.Context) (context.Context, error)
- func FilterChannel[T any](ctx context.Context, inputStream <-chan T, f FilterFunc[T]) <-chan T
- func Funnel[T any](sources ...<-chan T) <-chan T
- func Pipeline[T any](jobs ...Job[T])
- func Split[T any](source <-chan T, n int) []<-chan T
- func Workers[T any](ctx context.Context, f WorkFunc[T], n int, wg *sync.WaitGroup, source <-chan T, ...)
- func Wrap(ctx context.Context, f WrappedFunc) error
- type AggregateFunc
- type Broadcast
- type Circuit
- type Effector
- type FilterFunc
- type Iterator
- type Job
- type WorkFunc
- type WorkersCurator
- type WrappedFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCircuitWait = errors.New("err need more time wait before request")
)
View Source
var (
ErrEmptyParentContext = errors.New("empty parent context")
)
View Source
var (
ErrToManyCalls = errors.New("too many calls")
)
Functions ¶
func AggregateChannel ¶
func AggregateChannel[T any](ctx context.Context, inputStream <-chan T, f AggregateFunc[T]) <-chan T
func FilterChannel ¶
func FilterChannel[T any](ctx context.Context, inputStream <-chan T, f FilterFunc[T]) <-chan T
Types ¶
type AggregateFunc ¶
type AggregateFunc[T any] func(data T) T
type Broadcast ¶
type Broadcast[T any] struct { // contains filtered or unexported fields }
func (*Broadcast[T]) CancelSubscription ¶
func (b *Broadcast[T]) CancelSubscription(channel <-chan T)
type FilterFunc ¶
type Iterator ¶
type Iterator[T any] struct { // contains filtered or unexported fields }
func NewIterator ¶
type WorkersCurator ¶
type WorkersCurator[T any] struct { // contains filtered or unexported fields }
func NewWorkersCurator ¶
func (*WorkersCurator[T]) GetErrCh ¶
func (c *WorkersCurator[T]) GetErrCh() chan error
func (*WorkersCurator[T]) Wait ¶
func (c *WorkersCurator[T]) Wait()
type WrappedFunc ¶
type WrappedFunc func() error
Click to show internal directories.
Click to hide internal directories.