Documentation ¶
Index ¶
- type Manager
- func (m *Manager) AddProgress(progress string, current, total float64, updateInterval time.Duration) (exist bool)
- func (m *Manager) GetProgresses(filter func(p string) bool) []string
- func (m *Manager) RemoveProgress(progress string) (exist bool)
- func (m *Manager) Reset()
- func (m *Manager) Status(progress string) (process, leftSeconds, currentSpeed float64, err error)
- func (m *Manager) UpdateProgress(progress string, current, remaining float64, isInc bool)
- func (m *Manager) UpdateProgressTotal(progress string, total float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager is used to maintain the progresses we care about.
func (*Manager) AddProgress ¶
func (m *Manager) AddProgress(progress string, current, total float64, updateInterval time.Duration) (exist bool)
AddProgress adds a progress into manager if it doesn't exist.
func (*Manager) GetProgresses ¶
GetProgresses gets progresses according to the filter.
func (*Manager) RemoveProgress ¶
RemoveProgress removes a progress from manager.
func (*Manager) UpdateProgress ¶
UpdateProgress updates the progress if it exists.
func (*Manager) UpdateProgressTotal ¶
UpdateProgressTotal updates the total value of a progress if it exists.
Click to show internal directories.
Click to hide internal directories.