Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MIN_BLOCK_SIZE = 1024
)
Functions ¶
This section is empty.
Types ¶
type FSScanner ¶
type FSScanner struct { Root string // contains filtered or unexported fields }
FSScanner represents a filesystem scanner that can include or exclude specific patterns.
func (*FSScanner) AddExcludePattern ¶
func (*FSScanner) AddIncludePattern ¶
func (*FSScanner) WalkWithFilters ¶
WalkWithFilters scans the filesystem and applies the specified filters to the files that are found.
type FileDb ¶
type FileDb struct {
// contains filtered or unexported fields
}
FileDb is a database that keeps track of which files have been seen and whether they have been modified.
type Filter ¶
Filter is the generic interface for filters.
func FilterFunc ¶
FilterFunc lets you wrap a plain function with a Filter interface.
func MinimumSizeFilter ¶
Filter files with a minimum size.
func NonEmptyFileFilter ¶
func NonEmptyFileFilter() Filter
A simple filter that selects files with size greater than 0.
func StableFileFilter ¶
func StableFileFilter() Filter
type FpChecker ¶
type FpChecker struct {
// contains filtered or unexported fields
}
func NewFingerprintChecker ¶
func NewFingerprintChecker(httpClient *util.HttpClient, mimeTypesByExt map[string]string) *FpChecker
type RateLimitedBuffer ¶
type RateLimitedBuffer struct {
// contains filtered or unexported fields
}
func RateLimitedOpen ¶
func RateLimitedOpen(path string, rl *RateLimiter) (*RateLimitedBuffer, error)
func (*RateLimitedBuffer) Close ¶
func (rbuf *RateLimitedBuffer) Close() error
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter represents a global rate limit in bytes/sec. The time resolution of the global ticker is controlled by the base block size.
func NewRateLimiter ¶
func NewRateLimiter(rate int) *RateLimiter
func (*RateLimiter) Tick ¶
func (rl *RateLimiter) Tick() int
Source Files
¶
Click to show internal directories.
Click to hide internal directories.