downloader

package
v0.0.0-...-a2e9de6 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "No version specified" // Set from Makefile

)

Go doesn't like this as a constant

Functions

func Run

func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, arguments []string) int

Run downloader

Types

type CancelChannel

type CancelChannel chan Notify

CancelChannel is the type we send over a channel for the per-download cancels

type Notify

type Notify struct{}

Notify simple struct to pass notification messages

type PublishStatus

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

PublishStatus practical implementation of Status that knows how to update the progress to pubsub requires a context and status

func (*PublishStatus) Progress

func (d *PublishStatus) Progress(p uint, currentSize, totalSize int64) bool

Progress report progress as a percentage of completeness Returns true if there was a change to the recorded values

type Status

type Status interface {
	// Progress report progress; returns false if no change
	Progress(uint, int64, int64) bool
}

Status provides a struct that can be called to update download progress

Jump to

Keyboard shortcuts

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