downloader

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadWorker

type DownloadWorker struct {
	// contains filtered or unexported fields
}

DownloadWorker is the structure that processes downloads

func NewDownloader

func NewDownloader(registry registry.Interface, writer writers.Writer) (*DownloadWorker, error)

NewDownloader creates new downloader

func (*DownloadWorker) Download

func (d *DownloadWorker) Download(ctx context.Context, source string, target string, document string) error

Download downloads source as target

type Interface

type Interface interface {
	// Schedule is a typesafe wrapper for enqueuing download tasks. An error is returned if scheduling fails.
	Schedule(source string, target string, document string) error
}

Interface encapsulates activities for asynchronous and parallel scheduling and download of resources

func New

func New(workerCount int, failFast bool, wg *sync.WaitGroup, registry registry.Interface, writer writers.Writer) (Interface, taskqueue.QueueController, error)

New create a DownloadScheduler to schedule download resources

Directories

Path Synopsis
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors

Jump to

Keyboard shortcuts

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