pasloe

package
v0.0.0-...-bd23c5e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ProviderQueue

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

ProviderQueue represents the queue for each separate provider. The queue has just one internal worker This worker will always empty out the loadingQueue, then the downloadQueue. Each queue has a max capacity of 100. The worker is started automatically after creation

func NewProviderQueue

func NewProviderQueue(
	provider models.Provider,
	parentCtx context.Context,
	client core.Client,
	log zerolog.Logger,
) *ProviderQueue

func (*ProviderQueue) AddToDownloadQueue

func (pq *ProviderQueue) AddToDownloadQueue(content core.Downloadable) error

AddToDownloadQueue adds content to the download queue (for ready content)

func (*ProviderQueue) AddToLoadingQueue

func (pq *ProviderQueue) AddToLoadingQueue(content core.Downloadable) error

AddToLoadingQueue adds content to the loading queue

func (*ProviderQueue) Shutdown

func (pq *ProviderQueue) Shutdown()

Shutdown gracefully shuts down the provider queue, has a hard limit of 30s

type Registry

type Registry interface {
	Create(c core.Client, req payload.DownloadRequest) (core.Downloadable, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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