speed

package
v0.0.0-...-10a0d72 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Once

func Once(speed *Speed, proxy interfaces.Vendor, cfg *interfaces.SlaveRequestConfigs)

func RefetchDownloadFiles

func RefetchDownloadFiles(proxy interfaces.Vendor, file string) []string

func SingleThread

func SingleThread(downloadFiles []string, proxy interfaces.Vendor, timeoutSeconds int64, wc *WriteCounter) context.CancelFunc

Types

type Speed

type Speed struct {
	AvgSpeed  uint64
	MaxSpeed  uint64
	TotalSize uint64
	Speeds    []uint64
}

func (*Speed) Run

func (m *Speed) Run(proxy interfaces.Vendor, r *interfaces.SlaveRequest) error

func (*Speed) Type

type WriteCounter

type WriteCounter struct {
	Total     uint64
	RateLimit int64
	Lock      sync.Mutex
}

func (*WriteCounter) Take

func (wc *WriteCounter) Take() uint64

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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