redownload

package
v3.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package redownload contains redownload logic.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoChannels = errors.New("no channels found")

Functions

This section is empty.

Types

type FileStats

type FileStats struct {
	NumFiles uint
	NumBytes uint64
}

FileStats contains the file statistics.

func (*FileStats) Attr

func (fs *FileStats) Attr() slog.Attr

type Option

type Option func(*Redownloader)

func WithLogger

func WithLogger(lg *slog.Logger) Option

type Redownloader

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

func New

func New(ctx context.Context, dir string, opts ...Option) (*Redownloader, error)

New initialises the new Redownloader for the given directory. Source type is detected automatically. It validates if the source is of the supported type and returns any errors.

func (*Redownloader) Download

func (r *Redownloader) Download(ctx context.Context, cl fileproc.FileGetter) (FileStats, error)

func (*Redownloader) Stats

func (r *Redownloader) Stats(ctx context.Context) (FileStats, error)

func (*Redownloader) Stop

func (r *Redownloader) Stop() error

Stop stops the Redownloader.

Jump to

Keyboard shortcuts

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