Documentation ¶
Index ¶
- func RunJob(jobName, funcName string, job ProgressJob, magnitude int, ...) error
- func ShouldShowBar() bool
- type Job
- func (j *Job) AddTask(t *Task)
- func (j *Job) AddTasks(tasks []*Task)
- func (j *Job) CalculateMagnitude()
- func (j *Job) End(stopProgress bool)
- func (j *Job) EndBar()
- func (j *Job) GetCompletedMagnitude() float64
- func (j *Job) GetDone() (int, error)
- func (j *Job) GetProgress() (float64, error)
- func (j *Job) GetRemaining() (string, error)
- func (j *Job) GetStartTime() *time.Time
- func (j *Job) GetStatus() (string, error)
- func (j *Job) GetTask(id string) (*Task, error)
- func (j *Job) GetTasks() map[string]*Task
- func (j *Job) GetTook() *time.Duration
- func (j *Job) IncrBar()
- func (j *Job) SetBar(v int)
- func (j *Job) Start() error
- func (j *Job) String() string
- func (j *Job) UpdateBar()
- type ProgressJob
- type ProgressTask
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunJob ¶
func RunJob(jobName, funcName string, job ProgressJob, magnitude int, setupInput interface{}, runInput interface{}) error
func ShouldShowBar ¶
func ShouldShowBar() bool
Types ¶
type Job ¶
type Job struct { Name string Tasks map[string]*Task StartTime *time.Time EndTime *time.Time Took *time.Duration Magnitude float64 Progress int // 0-100 Bar *uiprogress.Bar }
func (*Job) CalculateMagnitude ¶
func (j *Job) CalculateMagnitude()
func (*Job) GetCompletedMagnitude ¶
func (*Job) GetProgress ¶
func (*Job) GetRemaining ¶
func (*Job) GetStartTime ¶
type ProgressJob ¶
type ProgressTask ¶
type ProgressTask interface { Start() End() }
Click to show internal directories.
Click to hide internal directories.