Skip to main content

NewReaderWorkItem

Creates and returns a new ReaderWorkItem instance, initializing it with the provided key and an output writer.

def NewReaderWorkItem(
key: Key,
outputsWriter: io.OutputWriter
) - > *ReaderWorkItem

Creates and returns a new ReaderWorkItem instance, initializing it with a key and an output writer. This function is used to construct work items for a reader process.

Parameters

NameTypeDescription
keyKeyThe unique identifier for the work item, used to reference and track its progress.
outputsWriterio.OutputWriterThe writer responsible for handling and storing the outputs generated by processing this work item.

Returns

TypeDescription
*ReaderWorkItemA pointer to a newly created ReaderWorkItem instance.