Documentation ¶
Index ¶
- type Runway
- func (e *Runway[T]) AddOutput(ctx context.Context, source Source[T])
- func (e *Runway[T]) Group() *errgroup.Group
- func (e *Runway[T]) Guard(w sync.WaitGroup)
- func (e *Runway[T]) PopOutput() <-chan T
- func (e *Runway[T]) Sink(ctx context.Context, step string, sink Sink[T])
- func (e *Runway[T]) Source(ctx context.Context, stage string, source Source[T])
- func (e *Runway[T]) Stage(ctx context.Context, name string, f Stage[T])
- func (e *Runway[T]) StageInput() chan<- T
- func (e *Runway[T]) Wait(w sync.WaitGroup)
- type Sink
- type Source
- type Stage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runway ¶
type Runway struct { ChannelSize int // contains filtered or unexported fields }
Runway starts coroutines and links them with channels.
func (*Runway[T]) AddOutput ¶
AddOutput adds given Sources output to the begin of the next Source or Stage.
func (*Runway[T]) Guard ¶
Guard adds a delta to given WaitGroup and clears it after the next Source, Stage or Sink is done.
func (*Runway[T]) PopOutput ¶
func (e *Runway[T]) PopOutput() <-chan T
PopOutput returns the output channel.
func (*Runway[T]) StageInput ¶
func (e *Runway[T]) StageInput() chan<- T
StageInput returns a new input channel.
Click to show internal directories.
Click to hide internal directories.