Skip to main content

NewDownloader

Creates and returns a new Downloader instance, configured with the specified data store, literal map format, and download mode.

def NewDownloader(
_: context.Context,
store: storage.DataStore,
format: core.DataLoadingConfig_LiteralMapFormat,
mode: core.IOStrategy_DownloadMode
) - > Downloader

Creates and returns a new Downloader instance configured with the specified data store, format, and download mode. Callers use this to initialize a Downloader for subsequent data loading operations.

Parameters

NameTypeDescription
_context.ContextThe context for the operation, typically used for cancellation or deadlines.
storestorage.DataStoreThe data store where the downloader will retrieve data from.
formatcore.DataLoadingConfig_LiteralMapFormatThe format in which the data should be interpreted or loaded.
modecore.IOStrategy_DownloadModeThe download mode specifying how the data should be downloaded (e.g., streaming, batch).

Returns

TypeDescription
DownloaderA new Downloader instance.