mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 02:18:41 +00:00
Update c/image and c/common to latest
... to include https://github.com/containers/image/pull/2173 and https://github.com/containers/common/pull/1731 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
33
vendor/github.com/vbauerster/mpb/v8/bar.go
generated
vendored
33
vendor/github.com/vbauerster/mpb/v8/bar.go
generated
vendored
@@ -61,7 +61,6 @@ type renderFrame struct {
|
||||
shutdown int
|
||||
rmOnComplete bool
|
||||
noPop bool
|
||||
done bool
|
||||
err error
|
||||
}
|
||||
|
||||
@@ -82,10 +81,10 @@ func newBar(ctx context.Context, container *Progress, bs *bState) *Bar {
|
||||
return bar
|
||||
}
|
||||
|
||||
// ProxyReader wraps io.Reader with metrics required for progress tracking.
|
||||
// If `r` is 'unknown total/size' reader it's mandatory to call
|
||||
// (*Bar).SetTotal(-1, true) method after (io.Reader).Read returns io.EOF.
|
||||
// If bar is already completed or aborted, returns nil.
|
||||
// ProxyReader wraps io.Reader with metrics required for progress
|
||||
// tracking. If `r` is 'unknown total/size' reader it's mandatory
|
||||
// to call `(*Bar).SetTotal(-1, true)` after the wrapper returns
|
||||
// `io.EOF`. If bar is already completed or aborted, returns nil.
|
||||
// Panics if `r` is nil.
|
||||
func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser {
|
||||
if r == nil {
|
||||
@@ -177,11 +176,10 @@ func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) {
|
||||
}
|
||||
}
|
||||
|
||||
// EnableTriggerComplete enables triggering complete event. It's
|
||||
// effective only for bars which were constructed with `total <= 0` and
|
||||
// after total has been set with (*Bar).SetTotal(int64, false). If bar
|
||||
// has been incremented to the total, complete event is triggered right
|
||||
// away.
|
||||
// EnableTriggerComplete enables triggering complete event. It's effective
|
||||
// only for bars which were constructed with `total <= 0` and after total
|
||||
// has been set with `(*Bar).SetTotal(int64, false)`. If `curren >= total`
|
||||
// at the moment of call, complete event is triggered right away.
|
||||
func (b *Bar) EnableTriggerComplete() {
|
||||
select {
|
||||
case b.operateState <- func(s *bState) {
|
||||
@@ -200,11 +198,11 @@ func (b *Bar) EnableTriggerComplete() {
|
||||
}
|
||||
}
|
||||
|
||||
// SetTotal sets total to an arbitrary value. It's effective only for
|
||||
// bar which was constructed with `total <= 0`. Setting total to negative
|
||||
// value is equivalent to (*Bar).SetTotal((*Bar).Current(), bool) but faster.
|
||||
// If triggerCompletion is true, total value is set to current and
|
||||
// complete event is triggered right away.
|
||||
// SetTotal sets total to an arbitrary value. It's effective only for bar
|
||||
// which was constructed with `total <= 0`. Setting total to negative value
|
||||
// is equivalent to `(*Bar).SetTotal((*Bar).Current(), bool)` but faster. If
|
||||
// triggerCompletion is true, total value is set to current and complete
|
||||
// event is triggered right away.
|
||||
func (b *Bar) SetTotal(total int64, triggerCompletion bool) {
|
||||
select {
|
||||
case b.operateState <- func(s *bState) {
|
||||
@@ -344,7 +342,7 @@ func (b *Bar) SetPriority(priority int) {
|
||||
// Abort interrupts bar's running goroutine. Abort won't be engaged
|
||||
// if bar is already in complete state. If drop is true bar will be
|
||||
// removed as well. To make sure that bar has been removed call
|
||||
// (*Bar).Wait method.
|
||||
// `(*Bar).Wait()` method.
|
||||
func (b *Bar) Abort(drop bool) {
|
||||
select {
|
||||
case b.operateState <- func(s *bState) {
|
||||
@@ -415,7 +413,6 @@ func (b *Bar) serve(ctx context.Context, bs *bState) {
|
||||
}
|
||||
|
||||
func (b *Bar) render(tw int) {
|
||||
var done bool
|
||||
fn := func(s *bState) {
|
||||
var rows []io.Reader
|
||||
stat := newStatistics(tw, s)
|
||||
@@ -437,7 +434,6 @@ func (b *Bar) render(tw int) {
|
||||
shutdown: s.shutdown,
|
||||
rmOnComplete: s.rmOnComplete,
|
||||
noPop: s.noPop,
|
||||
done: done,
|
||||
}
|
||||
if s.completed || s.aborted {
|
||||
// post increment makes sure OnComplete decorators are rendered
|
||||
@@ -448,7 +444,6 @@ func (b *Bar) render(tw int) {
|
||||
select {
|
||||
case b.operateState <- fn:
|
||||
case <-b.done:
|
||||
done = true
|
||||
fn(b.bs)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user