repos

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadStateRepo

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

func NewDownloadStateRepo

func NewDownloadStateRepo() *DownloadStateRepo

func (*DownloadStateRepo) AddDownload

func (r *DownloadStateRepo) AddDownload(key string)

func (*DownloadStateRepo) BuildKey

func (r *DownloadStateRepo) BuildKey(domain, netdiskID string) string

func (*DownloadStateRepo) GetWaitingList

func (r *DownloadStateRepo) GetWaitingList() WaitListSorted

func (*DownloadStateRepo) IsDownloading

func (r *DownloadStateRepo) IsDownloading(domain, netdiskID string) bool

func (*DownloadStateRepo) RemoveDownloading

func (r *DownloadStateRepo) RemoveDownloading(key string)

func (*DownloadStateRepo) SplitKey

func (r *DownloadStateRepo) SplitKey(key string) (domain, netdiskID string, ok bool)

func (*DownloadStateRepo) Wait

func (r *DownloadStateRepo) Wait(ctx context.Context, domain, netdiskID string) bool

type WaitElem

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

func (*WaitElem) GetAmt

func (we *WaitElem) GetAmt() int

func (*WaitElem) GetKey

func (we *WaitElem) GetKey() string

type WaitListSorted

type WaitListSorted []WaitElem

func (WaitListSorted) Len

func (w WaitListSorted) Len() int

func (WaitListSorted) Less

func (w WaitListSorted) Less(i, j int) bool

func (WaitListSorted) Swap

func (w WaitListSorted) Swap(i, j int)

Jump to

Keyboard shortcuts

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