Documentation
¶
Index ¶
- func Drain(ch chan *Msg) *sync.WaitGroup
- func NextItemInSliceStreams(ctx context.Context, streamSlices []*Stream, streamToProcess []int) (string, error)
- type FanIn
- type Msg
- type Stream
- func (s *Stream) Drain(ctx context.Context) ([]string, error)
- func (s *Stream) Head(ctx context.Context) (string, error)
- func (s *Stream) Idx() int
- func (s *Stream) Next(ctx context.Context) (string, error)
- func (s *Stream) SkipToTargetObject(ctx context.Context, target string) error
- func (s *Stream) Stop()
- type Streams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NextItemInSliceStreams ¶
func NextItemInSliceStreams(ctx context.Context, streamSlices []*Stream, streamToProcess []int) (string, error)
NextItemInSliceStreams will advance all streamSlices specified in streamToProcess and return the item advanced. Assumption is that the stream slices first item is identical, and we want to advance all these streams.
Types ¶
type FanIn ¶
type FanIn struct {
// contains filtered or unexported fields
}
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream aggregates multiple iterators that are sent to a source channel into one iterator.
func (*Stream) Head ¶
Head returns the first item in the buffer. If the Head is sourceIsClosed or cancelled, it will stop the buffer and set the buffer to nil.
func (*Stream) SkipToTargetObject ¶
SkipToTargetObject moves the buffer until the buffer's head object is >= target object. If the buffer is drained and no more items, it will set to stop and buffer will be nil.
type Streams ¶
type Streams struct {
// contains filtered or unexported fields
}
func NewStreams ¶
func (*Streams) CleanDone ¶
CleanDone will clean up the sourceIsClosed iterator streams and return a list of the remaining active streams. To be considered active your source channel must still be open.
func (*Streams) GetActiveStreamsCount ¶
GetActiveStreamsCount will return the active streams from the last time CleanDone was called.