downloadservice

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	ID           string                 `json:"id"`
	TaskType     string                 `json:"taskType"`
	ModelJob     runtimetypes.QueueItem `json:"modelJob"`
	ScheduledFor int64                  `json:"scheduledFor"`
	ValidUntil   int64                  `json:"validUntil"`
	CreatedAt    time.Time              `json:"createdAt"`
}

type Service

type Service interface {
	CurrentDownloadQueueState(ctx context.Context) ([]Job, error)
	CancelDownloads(ctx context.Context, url string) error
	RemoveDownloadFromQueue(ctx context.Context, modelName string) error
	DownloadInProgress(ctx context.Context, statusCh chan<- *runtimetypes.Status) error
}

func New

func New(dbInstance libdb.DBManager, psInstance libbus.Messenger) Service

func WithActivityTracker

func WithActivityTracker(service Service, tracker activitytracker.ActivityTracker) Service

Jump to

Keyboard shortcuts

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