downloader

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

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

NewPlugin creates a new downloader plugin

Types

type Interface

type Interface interface {
	// Schedule is a typesafe wrapper for enqueuing download tasks. An error is returned if scheduling fails.
	Schedule(source string, destinationPath 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

type ResourceDownloadWorker

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

ResourceDownloadWorker is the structure that processes downloads

func NewDownloader

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

NewDownloader creates new downloader

func (*ResourceDownloadWorker) Download

func (d *ResourceDownloadWorker) Download(ctx context.Context, source string, destinationPath string) error

Download downloads source in destinationPath

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