Documentation ¶
Index ¶
- type DownloadStateRepo
- func (r *DownloadStateRepo) AddDownload(key string)
- func (r *DownloadStateRepo) BuildKey(domain, netdiskID string) string
- func (r *DownloadStateRepo) GetWaitingList() WaitListSorted
- func (r *DownloadStateRepo) IsDownloading(domain, netdiskID string) bool
- func (r *DownloadStateRepo) RemoveDownloading(key string)
- func (r *DownloadStateRepo) SplitKey(key string) (domain, netdiskID string, ok bool)
- func (r *DownloadStateRepo) Wait(ctx context.Context, domain, netdiskID string) bool
- type WaitElem
- type WaitListSorted
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)
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)
Click to show internal directories.
Click to hide internal directories.