@@ -31,7 +31,7 @@ import (
3131 "github.com/Azure/azure-storage-azcopy/v10/jobsAdmin"
3232)
3333
34- type JobProgressTracker interface {
34+ type jobProgressTracker interface {
3535 // Start - calls OnStart
3636 Start ()
3737 // CheckProgress checks the progress of the job and returns the number of transfers completed so far and whether the job is done
@@ -44,7 +44,7 @@ type JobProgressTracker interface {
4444 GetElapsedTime () time.Duration
4545}
4646
47- type JobLifecycleManager struct {
47+ type jobLifecycleManager struct {
4848 completionFuncs []func ()
4949 completionChan chan struct {}
5050 errorChan chan string
@@ -62,8 +62,8 @@ type JobLifecycleManager struct {
6262// - Automatically reduces to 2-minute intervals for large jobs (>1M transfers)
6363// - Matches the behavior of AzCopy's lifecycle manager
6464// - Logs frequency changes via the Info() method
65- func NewJobLifecycleManager (handler * common.JobUIHooks ) * JobLifecycleManager {
66- jlcm := & JobLifecycleManager {
65+ func NewJobLifecycleManager (handler * common.JobUIHooks ) * jobLifecycleManager {
66+ jlcm := & jobLifecycleManager {
6767 completionFuncs : make ([]func (), 0 ),
6868 completionChan : make (chan struct {}, 1 ),
6969 errorChan : make (chan string , 1 ),
@@ -74,11 +74,11 @@ func NewJobLifecycleManager(handler *common.JobUIHooks) *JobLifecycleManager {
7474 return jlcm
7575}
7676
77- func (j * JobLifecycleManager ) RegisterCloseFunc (f func ()) {
77+ func (j * jobLifecycleManager ) RegisterCloseFunc (f func ()) {
7878 j .completionFuncs = append (j .completionFuncs , f )
7979}
8080
81- func (j * JobLifecycleManager ) OnComplete () {
81+ func (j * jobLifecycleManager ) OnComplete () {
8282 j .mutex .Lock ()
8383 defer j .mutex .Unlock ()
8484
@@ -103,7 +103,7 @@ func (j *JobLifecycleManager) OnComplete() {
103103}
104104
105105// TODO : rename interface method to OnError to match other method naming conventions
106- func (j * JobLifecycleManager ) Error (err string ) {
106+ func (j * jobLifecycleManager ) Error (err string ) {
107107 j .mutex .Lock ()
108108 defer j .mutex .Unlock ()
109109
@@ -128,13 +128,13 @@ func (j *JobLifecycleManager) Error(err string) {
128128 }
129129}
130130
131- func (j * JobLifecycleManager ) GetError () error {
131+ func (j * jobLifecycleManager ) GetError () error {
132132 j .mutex .RLock ()
133133 defer j .mutex .RUnlock ()
134134 return common .Iff (j .lastError == "" , nil , errors .New (j .lastError ))
135135}
136136
137- func (j * JobLifecycleManager ) Wait () error {
137+ func (j * jobLifecycleManager ) Wait () error {
138138 j .mutex .RLock ()
139139 isDone := j .done
140140 lastError := j .lastError
@@ -156,7 +156,7 @@ func (j *JobLifecycleManager) Wait() error {
156156 }
157157}
158158
159- func (j * JobLifecycleManager ) InitiateProgressReporting (ctx context.Context , reporter JobProgressTracker ) {
159+ func (j * jobLifecycleManager ) InitiateProgressReporting (ctx context.Context , reporter jobProgressTracker ) {
160160 reporter .Start ()
161161
162162 // Start progress reporting in a separate goroutine with adaptive frequency
@@ -243,7 +243,7 @@ func (j *JobLifecycleManager) InitiateProgressReporting(ctx context.Context, rep
243243 }()
244244}
245245
246- func (j * JobLifecycleManager ) cancelJob (jobID common.JobID ) error {
246+ func (j * jobLifecycleManager ) cancelJob (jobID common.JobID ) error {
247247 if jobID .IsEmpty () {
248248 return errors .New ("cancel job requires the JobID" )
249249 }
0 commit comments