downloader

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package downloader is responsible for Weles system's job artifact downloading.

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrQueueFull is returned when download queue is full.
	ErrQueueFull = errors.New("downlad queue is full")
)

Functions

This section is empty.

Types

type Downloader

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

Downloader implements ArtifactDownloader interface.

func NewDownloader

func NewDownloader(notification chan weles.ArtifactStatusChange, workerCount, queueCap int,
) *Downloader

NewDownloader returns Downloader initialized with default queue length

func (*Downloader) CheckInCache

func (d *Downloader) CheckInCache(URI weles.ArtifactURI) (weles.ArtifactInfo, error)

CheckInCache is part of implementation of ArtifactDownloader interface. TODO implement.

func (*Downloader) Close

func (d *Downloader) Close()

Close is part of implementation of ArtifactDownloader interface. It waits for running download jobs to stop and closes used channels.

func (*Downloader) Download

Download is part of implementation of ArtifactDownloader interface. It puts new downloadJob on the queue.

Jump to

Keyboard shortcuts

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