Documentation ¶
Index ¶
- Variables
- func IsScanning(conn redis.Conn, id int) (bool, error)
- func Scan(typ ScannerType, r *database.Redis, url string, id int, stop <-chan struct{}) error
- func ScanSource(r *database.Redis, forceRehash bool, stop <-chan struct{}) (err error)
- type FTPScanner
- type RsyncScanner
- type Scanner
- type ScannerType
- type Trace
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrScanAborted is returned when a scan is aborted by the user ErrScanAborted = errors.New("scan aborted") // ErrScanInProgress is returned when a scan is started while another is already in progress ErrScanInProgress = errors.New("scan already in progress") // ErrNoSyncMethod is returned when no sync protocol is available ErrNoSyncMethod = errors.New("no suitable URL for the scan") )
View Source
var ( // ErrNoTrace is returned when no trace file is found ErrNoTrace = errors.New("No trace file") )
Functions ¶
func IsScanning ¶
IsScanning returns true is a scan is already in progress for the given mirror
Types ¶
type FTPScanner ¶
type FTPScanner struct {
// contains filtered or unexported fields
}
FTPScanner is the implementation of an ftp scanner
type RsyncScanner ¶
type RsyncScanner struct {
// contains filtered or unexported fields
}
RsyncScanner is the implementation of an rsync scanner
type Scanner ¶
type Scanner interface {
Scan(url, identifier string, conn redis.Conn, stop <-chan struct{}) error
}
Scanner is the interface that all scanners must implement
type ScannerType ¶
type ScannerType int8
ScannerType holds the type of scanner in use
const ( // RSYNC represents an rsync scanner RSYNC ScannerType = iota // FTP represents an ftp scanner FTP )
type Trace ¶
type Trace struct {
// contains filtered or unexported fields
}
Trace is the internal trace handler
func NewTraceHandler ¶
NewTraceHandler returns a new instance of the trace file handler. Trace files are used to compute the time offset between a mirror and the local repository.
Click to show internal directories.
Click to hide internal directories.