package
Version:
v0.0.0-...-d2d682e
Opens a new window with list of versions in this module.
Published: Jan 7, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package progress implements a thread-safe progress mechanism which will be used in crawler to keep track of the progress.
type Progress struct {
Lock sync.Mutex
PageNum int
Bar *progressbar.ProgressBar
}
Progress contains a mutex to ensure thread-safety, PageNum for keeping track of the number of the processed pages, and a progress bar for CLI.
New initializes and returns a Progress. It uses default progressbar config.
Add adds delta to the progress.
Current returns the current number of pages processed.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.