Report live correction progress through CommandKit
This commit is contained in:
18
internal/framework/runner/progress.go
Normal file
18
internal/framework/runner/progress.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package runner
|
||||
|
||||
// Progress identifies work admitted or completed by the runner.
|
||||
type Progress struct {
|
||||
ModuleIndex int
|
||||
ModuleKey string
|
||||
ModuleID *string
|
||||
SectionIndex *int
|
||||
State string
|
||||
Count *int
|
||||
}
|
||||
|
||||
func (event Progress) emit(callback func(Progress), state string, section *int, count *int) {
|
||||
if callback != nil {
|
||||
event.State, event.SectionIndex, event.Count = state, section, count
|
||||
callback(event)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user