handler

package
v0.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 0

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,
	clientConfig model.ClientConfig,
	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.

Directories

Path Synopsis
Code generated.
Code generated.
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL