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 obtain a Downloader object for subsequent data loading operations.

Parameters

NameTypeDescription
_context.ContextThe context for the operation, typically used for cancellation or deadlines. This parameter is currently unused within the function.
storestorage.DataStoreThe data store from which data will be downloaded. This defines the source of the data.
formatcore.DataLoadingConfig_LiteralMapFormatThe format in which the data should be interpreted or downloaded. This specifies the structure of the data.
modecore.IOStrategy_DownloadModeThe download mode to be used, dictating the strategy for downloading data (e.g., direct download, streamed). This controls how the data transfer is performed.

Returns

TypeDescription
DownloaderA new Downloader instance configured with the provided parameters.