Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadHandler ¶
func DownloadHandler(ctx *cli.Context, piece string, api string, config map[string]string, outDir string, concurrency int, ) error
DownloadHandler fetches the metadata for a specified piece from a remote API and downloads the associated content. The content is then saved to a .car file in the specified directory.
Parameters: - ctx: The context for the operation. - piece: The identifier of the content piece to be downloaded. - api: The base URL of the API from which metadata is to be fetched. - config: A map containing configuration settings for various storage types. - outDir: The directory where the downloaded content should be saved. - concurrency: The number of concurrent operations allowed during the download.
Returns: - An error, if any occurred during the download process.
Types ¶
This section is empty.