Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyQueue = fmt.Errorf("Queue is empty") ErrQueueNotFound = fmt.Errorf("Queue doesn't exist") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ErrCh!=nil means errors during download are sent to
// this channel for the client to consume.
ErrChan chan error
MaxConcurrentDownloads uint
// MaxFailError is the maximum number that an entry can fail
// after failing N times it will not make it will not be re-queued
MaxFailError uint
// UpdateTimeMs specify the rate of which the info about the
// entity that is currently downloading should be updated ,
// this should be in millisecond (ms)
UpdateTimeMs uint
Repo Repository
// WaitGroup!=nil will update the wait group as goroutines
// are started and finished.
WaitGroup *sync.WaitGroup
}
type EntryExtraData ¶
type EntryRepository ¶
type Fafnir ¶
type Fafnir struct {
Cfg *Config
}
func (*Fafnir) StartQueueDownload ¶
type Queue ¶
type Queue struct {
Name string
Entries []Entry
FailedEntries []Entry
// contains filtered or unexported fields
}
func (*Queue) DeQueueFail ¶
func (*Queue) EnQueueFail ¶
func (*Queue) SortByName ¶
type QueueRepository ¶
type Repository ¶
type Repository interface {
QueueRepository
EntryRepository
}
Click to show internal directories.
Click to hide internal directories.
