loader

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(key string, cfg *commonconfig.DownloaderConfig, factory CreateFunc, params interface{}) bool

Types

type CreateFunc

type CreateFunc func(interface{}) ITable

type ITable

type ITable interface {
}

func GetTable

func GetTable(key string) ITable

type Job

type Job struct {
	Finder         finder.IFinder
	Interval       int
	LastUpdateTime int64
}

type Manager

type Manager struct {
	Locker   *sync.RWMutex
	TableMap map[string]ITable
	JobMap   map[string]*Job
}
var ManagerImp *Manager

type Status

type Status int
const (
	DownloadOK Status = iota + 1
	RemoteFileError
	LocalFileIsNewest
	DownloadFileError
)

Jump to

Keyboard shortcuts

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