| 1 | package tasklogscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/ |
| 2 | |
| 3 | import "timescip-go gomod github.com/golang/go/src go1.25.0 time/" |
| 4 | |
| 5 | // Task is an interface which encapsulates an activity which can be logged. |
| 6 | type Taskscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Task# interface { |
| 7 | // Updates returns a channel which is written to with the current state |
| 8 | // of the Task when an update is present. It is closed when the task is |
| 9 | // complete. |
| 10 | Updatesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Task#Updates.() <-chan *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update# |
| 11 | |
| 12 | // Throttled returns whether or not updates from this task should be |
| 13 | // limited when being printed to a sink via *log.Logger. |
| 14 | // |
| 15 | // It is expected to return the same value for a given Task instance. |
| 16 | Throttledscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Task#Throttled.() bool |
| 17 | } |
| 18 | |
| 19 | // Update is a single message sent (S) from a Task at a given time (At). |
| 20 | type Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update# struct { |
| 21 | // S is the message sent in this update. |
| 22 | Sscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#S. string |
| 23 | // At is the time that this update was sent. |
| 24 | Atscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#At. timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time# |
| 25 | |
| 26 | // Force determines if this update should not be throttled. |
| 27 | Forcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#Force. bool |
| 28 | } |
| 29 | |
| 30 | // Throttled determines whether this update should be throttled, based on the |
| 31 | // given earliest time of the next update. The caller should determine how often |
| 32 | // updates should be throttled. An Update with Force=true is never throttled. |
| 33 | func (u *Updatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#) Throttledscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#Throttled().(next timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#) bool { |
| 34 | return !(u.Forcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#Force. || u.Atscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tasklog`/Update#At..Afterscip-go gomod github.com/golang/go/src go1.25.0 time/Time#After().(next)) |
| 35 | } |