Documentation
¶
Index ¶
- func AddParallelChain[N, I, O any](opts flagutils.OptionSetProvider, c chain.Chain[I, O], a chain.Chain[O, N]) chain.Chain[I, N]
- type Options
- func (o *Options) Finalize(ctx context.Context, opts flagutils.OptionSet, v flagutils.FinalizationSet) error
- func (o *Options) GetPool() processing.Processing
- func (o *Options) Validate(ctx context.Context, opts flagutils.OptionSet, v flagutils.ValidationSet) error
- func (o *Options) WithPoolProvider(p PoolProvider) *Options
- type PoolProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddParallelChain ¶
func AddParallelChain[N, I, O any](opts flagutils.OptionSetProvider, c chain.Chain[I, O], a chain.Chain[O, N]) chain.Chain[I, N]
AddParallelChain evaluates the parallel Options (if present) to decide whether chain a should be executed parallel or just added to chain c. This helper can be used, for example, by output implementations to organize their processing chains.
Types ¶
type Options ¶
type Options struct {
flagutils.SimpleOption[int, *Options]
// contains filtered or unexported fields
}
func From ¶
func From(opts flagutils.OptionSetProvider) *Options
func (*Options) GetPool ¶
func (o *Options) GetPool() processing.Processing
func (*Options) WithPoolProvider ¶
func (o *Options) WithPoolProvider(p PoolProvider) *Options
type PoolProvider ¶
type PoolProvider func(ctx context.Context, n int) processing.Processing
Click to show internal directories.
Click to hide internal directories.