downloader

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadProgress

type DownloadProgress struct {
	Downloaded int64
	Total      int64
	Dest       string
}

type Events

type Events struct {
	Status          string
	Progress        string
	Done            string
	Error           string
	ProgressFactory func(DownloadProgress) any
}

type Manager

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

func NewManager

func NewManager(events Events, opts Options) *Manager

func (*Manager) Cancel

func (m *Manager) Cancel()

func (*Manager) Pause

func (m *Manager) Pause()

func (*Manager) Resume

func (m *Manager) Resume()

func (*Manager) Start

func (m *Manager) Start(ctx context.Context, src string, dest string) string

type Options

type Options struct {
	Throttle       time.Duration
	Resume         bool
	RemoveOnCancel bool
}

Jump to

Keyboard shortcuts

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