Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZipStreams ¶
type ZipStreams[T, V any] struct { // contains filtered or unexported fields }
ZipStreams is a helper for iterate two streams and process elements in the leader stream only if they don't already exists in the follower stream. The streams must be sorted and comparable.
func NewZipStreams ¶
func NewZipStreams[T, V any](leader stream.Stream[T], follower stream.Stream[V], onMissing func(elem T) error, onEqualKeys func(leader T, follower V) error, compare func(leader T, follower V) int, ) *ZipStreams[T, V]
NewZipStreams returns a new instance of ZipStreams.
func (*ZipStreams[T, V]) Process ¶
func (z *ZipStreams[T, V]) Process() error
Process consumes the streams and returns an error reported by handler functions. Processing will stop on the first error.
Click to show internal directories.
Click to hide internal directories.