Skip to main content

NewUploader

No overview available.

def NewUploader(
_: context.Context,
store: *storage.DataStore,
format: core.DataLoadingConfig_LiteralMapFormat,
mode: core.IOStrategy_UploadMode,
errorFileName: string
) - > Uploader

Creates and returns a new Uploader instance, configured with the specified data format, storage, upload mode, and error file name. Callers use this to initialize an object capable of handling data uploads according to defined specifications.

Parameters

NameTypeDescription
_context.ContextThe context for the operation, typically used for cancellation or deadlines. This parameter is currently unused.
store*storage.DataStoreThe data store where the uploaded data will be persisted.
formatcore.DataLoadingConfig_LiteralMapFormatThe format of the data to be uploaded, defining how the data should be interpreted.
modecore.IOStrategy_UploadModeThe upload mode, specifying the strategy for handling the upload process (e.g., overwrite, append).
errorFileNamestringThe name of the file where any upload errors will be logged or stored.

Returns

TypeDescription
UploaderA new Uploader instance configured with the provided parameters.