Skip to main content

NewWriterWorkItem

Creates and returns a new WriterWorkItem instance initialized with the provided key, data, and metadata.

def NewWriterWorkItem(
key: Key,
data: io.OutputReader,
metadata: Metadata
) - > *WriterWorkItem

Creates and returns a new WriterWorkItem instance, encapsulating the necessary components for a writing operation.

Parameters

NameTypeDescription
keyKeyThe unique identifier for the work item, used to reference or retrieve the data.
dataio.OutputReaderThe data to be written, provided as an io.OutputReader interface.
metadataMetadataAdditional information or attributes associated with the work item.

Returns

TypeDescription
*WriterWorkItemA pointer to a new WriterWorkItem instance.