mirror of
https://github.com/containers/podman.git
synced 2025-10-20 12:43:58 +08:00
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.9.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -68,7 +68,7 @@ require (
|
|||||||
github.com/spf13/cobra v1.9.1
|
github.com/spf13/cobra v1.9.1
|
||||||
github.com/spf13/pflag v1.0.6
|
github.com/spf13/pflag v1.0.6
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.10.0
|
||||||
github.com/vbauerster/mpb/v8 v8.9.2
|
github.com/vbauerster/mpb/v8 v8.9.3
|
||||||
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f
|
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f
|
||||||
go.etcd.io/bbolt v1.3.11
|
go.etcd.io/bbolt v1.3.11
|
||||||
golang.org/x/crypto v0.33.0
|
golang.org/x/crypto v0.33.0
|
||||||
|
4
go.sum
4
go.sum
@ -515,8 +515,8 @@ github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
|
|||||||
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||||
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
|
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
|
||||||
github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
|
github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
|
||||||
github.com/vbauerster/mpb/v8 v8.9.2 h1:kb91+D643Qg040bbICYtzpjgZ9ypVO/+sjv4Jcm6si4=
|
github.com/vbauerster/mpb/v8 v8.9.3 h1:PnMeF+sMvYv9u23l6DO6Q3+Mdj408mjLRXIzmUmU2Z8=
|
||||||
github.com/vbauerster/mpb/v8 v8.9.2/go.mod h1:hxS8Hz4C6ijnppDSIX6LjG8FYJSoPo9iIOcE53Zik0c=
|
github.com/vbauerster/mpb/v8 v8.9.3/go.mod h1:hxS8Hz4C6ijnppDSIX6LjG8FYJSoPo9iIOcE53Zik0c=
|
||||||
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f h1:G5t3qYQ3YL2zMn2kFzRYIPk1EvDvMNV9pP+w+39VtzI=
|
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f h1:G5t3qYQ3YL2zMn2kFzRYIPk1EvDvMNV9pP+w+39VtzI=
|
||||||
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
|
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
|
||||||
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
|
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
|
||||||
|
56
vendor/github.com/vbauerster/mpb/v8/bar.go
generated
vendored
56
vendor/github.com/vbauerster/mpb/v8/bar.go
generated
vendored
@ -45,7 +45,7 @@ type bState struct {
|
|||||||
noPop bool
|
noPop bool
|
||||||
autoRefresh bool
|
autoRefresh bool
|
||||||
buffers [3]*bytes.Buffer
|
buffers [3]*bytes.Buffer
|
||||||
decorators [2][]decor.Decorator
|
decorGroups [2][]decor.Decorator
|
||||||
ewmaDecorators []decor.EwmaDecorator
|
ewmaDecorators []decor.EwmaDecorator
|
||||||
filler BarFiller
|
filler BarFiller
|
||||||
extender extenderFunc
|
extender extenderFunc
|
||||||
@ -156,24 +156,16 @@ func (b *Bar) SetRefill(amount int64) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TraverseDecorators traverses available decorators and calls cb func
|
// TraverseDecorators traverses available decorators and calls `cb`
|
||||||
// on each in a new goroutine. Decorators implementing decor.Wrapper
|
// on each unwrapped one.
|
||||||
// interface are unwrapped first.
|
|
||||||
func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) {
|
func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) {
|
||||||
select {
|
select {
|
||||||
case b.operateState <- func(s *bState) {
|
case b.operateState <- func(s *bState) {
|
||||||
var wg sync.WaitGroup
|
for _, group := range s.decorGroups {
|
||||||
for _, decorators := range s.decorators {
|
for _, d := range group {
|
||||||
wg.Add(len(decorators))
|
cb(unwrap(d))
|
||||||
for _, d := range decorators {
|
|
||||||
d := d
|
|
||||||
go func() {
|
|
||||||
cb(unwrap(d))
|
|
||||||
wg.Done()
|
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wg.Wait()
|
|
||||||
}:
|
}:
|
||||||
case <-b.ctx.Done():
|
case <-b.ctx.Done():
|
||||||
}
|
}
|
||||||
@ -402,8 +394,8 @@ func (b *Bar) Wait() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *Bar) serve(bs *bState) {
|
func (b *Bar) serve(bs *bState) {
|
||||||
decoratorsOnShutdown := func(decorators []decor.Decorator) {
|
decoratorsOnShutdown := func(group []decor.Decorator) {
|
||||||
for _, d := range decorators {
|
for _, d := range group {
|
||||||
if d, ok := unwrap(d).(decor.ShutdownListener); ok {
|
if d, ok := unwrap(d).(decor.ShutdownListener); ok {
|
||||||
b.container.bwg.Add(1)
|
b.container.bwg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
@ -418,8 +410,8 @@ func (b *Bar) serve(bs *bState) {
|
|||||||
case op := <-b.operateState:
|
case op := <-b.operateState:
|
||||||
op(bs)
|
op(bs)
|
||||||
case <-b.ctx.Done():
|
case <-b.ctx.Done():
|
||||||
decoratorsOnShutdown(bs.decorators[0])
|
decoratorsOnShutdown(bs.decorGroups[0])
|
||||||
decoratorsOnShutdown(bs.decorators[1])
|
decoratorsOnShutdown(bs.decorGroups[1])
|
||||||
// bar can be aborted by canceling parent ctx without calling b.Abort
|
// bar can be aborted by canceling parent ctx without calling b.Abort
|
||||||
bs.aborted = !bs.completed()
|
bs.aborted = !bs.completed()
|
||||||
b.bs = bs
|
b.bs = bs
|
||||||
@ -491,8 +483,8 @@ func (b *Bar) wSyncTable() syncTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *bState) draw(stat decor.Statistics) (_ io.Reader, err error) {
|
func (s *bState) draw(stat decor.Statistics) (_ io.Reader, err error) {
|
||||||
decorFiller := func(buf *bytes.Buffer, decorators []decor.Decorator) (err error) {
|
decorFiller := func(buf *bytes.Buffer, group []decor.Decorator) (err error) {
|
||||||
for _, d := range decorators {
|
for _, d := range group {
|
||||||
// need to call Decor in any case because of width synchronization
|
// need to call Decor in any case because of width synchronization
|
||||||
str, width := d.Decor(stat)
|
str, width := d.Decor(stat)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -511,7 +503,7 @@ func (s *bState) draw(stat decor.Statistics) (_ io.Reader, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i, buf := range s.buffers[:2] {
|
for i, buf := range s.buffers[:2] {
|
||||||
err = decorFiller(buf, s.decorators[i])
|
err = decorFiller(buf, s.decorGroups[i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -545,34 +537,20 @@ func (s *bState) draw(stat decor.Statistics) (_ io.Reader, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *bState) wSyncTable() (table syncTable) {
|
func (s *bState) wSyncTable() (table syncTable) {
|
||||||
var count int
|
var start int
|
||||||
var row []chan int
|
var row []chan int
|
||||||
|
|
||||||
for i, decorators := range s.decorators {
|
for i, group := range s.decorGroups {
|
||||||
for _, d := range decorators {
|
for _, d := range group {
|
||||||
if ch, ok := d.Sync(); ok {
|
if ch, ok := d.Sync(); ok {
|
||||||
row = append(row, ch)
|
row = append(row, ch)
|
||||||
count++
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch i {
|
table[i], start = row[start:], len(row)
|
||||||
case 0:
|
|
||||||
table[i] = row[0:count]
|
|
||||||
default:
|
|
||||||
table[i] = row[len(table[i-1]):count]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return table
|
return table
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *bState) populateEwmaDecorators(decorators []decor.Decorator) {
|
|
||||||
for _, d := range decorators {
|
|
||||||
if d, ok := unwrap(d).(decor.EwmaDecorator); ok {
|
|
||||||
s.ewmaDecorators = append(s.ewmaDecorators, d)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *bState) triggerCompletion(b *Bar) {
|
func (s *bState) triggerCompletion(b *Bar) {
|
||||||
s.triggerComplete = true
|
s.triggerComplete = true
|
||||||
if s.autoRefresh {
|
if s.autoRefresh {
|
||||||
|
30
vendor/github.com/vbauerster/mpb/v8/bar_option.go
generated
vendored
30
vendor/github.com/vbauerster/mpb/v8/bar_option.go
generated
vendored
@ -10,31 +10,29 @@ import (
|
|||||||
// BarOption is a func option to alter default behavior of a bar.
|
// BarOption is a func option to alter default behavior of a bar.
|
||||||
type BarOption func(*bState)
|
type BarOption func(*bState)
|
||||||
|
|
||||||
func inspect(decorators []decor.Decorator) (dest []decor.Decorator) {
|
|
||||||
for _, decorator := range decorators {
|
|
||||||
if decorator == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
dest = append(dest, decorator)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// PrependDecorators let you inject decorators to the bar's left side.
|
// PrependDecorators let you inject decorators to the bar's left side.
|
||||||
func PrependDecorators(decorators ...decor.Decorator) BarOption {
|
func PrependDecorators(decorators ...decor.Decorator) BarOption {
|
||||||
decorators = inspect(decorators)
|
var group []decor.Decorator
|
||||||
|
for _, decorator := range decorators {
|
||||||
|
if decorator != nil {
|
||||||
|
group = append(group, decorator)
|
||||||
|
}
|
||||||
|
}
|
||||||
return func(s *bState) {
|
return func(s *bState) {
|
||||||
s.populateEwmaDecorators(decorators)
|
s.decorGroups[0] = group
|
||||||
s.decorators[0] = decorators
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppendDecorators let you inject decorators to the bar's right side.
|
// AppendDecorators let you inject decorators to the bar's right side.
|
||||||
func AppendDecorators(decorators ...decor.Decorator) BarOption {
|
func AppendDecorators(decorators ...decor.Decorator) BarOption {
|
||||||
decorators = inspect(decorators)
|
var group []decor.Decorator
|
||||||
|
for _, decorator := range decorators {
|
||||||
|
if decorator != nil {
|
||||||
|
group = append(group, decorator)
|
||||||
|
}
|
||||||
|
}
|
||||||
return func(s *bState) {
|
return func(s *bState) {
|
||||||
s.populateEwmaDecorators(decorators)
|
s.decorGroups[1] = group
|
||||||
s.decorators[1] = decorators
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
vendor/github.com/vbauerster/mpb/v8/progress.go
generated
vendored
8
vendor/github.com/vbauerster/mpb/v8/progress.go
generated
vendored
@ -442,6 +442,14 @@ func (s pState) makeBarState(total int64, filler BarFiller, options ...BarOption
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, group := range bs.decorGroups {
|
||||||
|
for _, d := range group {
|
||||||
|
if d, ok := unwrap(d).(decor.EwmaDecorator); ok {
|
||||||
|
bs.ewmaDecorators = append(bs.ewmaDecorators, d)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bs.buffers[0] = bytes.NewBuffer(make([]byte, 0, 128)) // prepend
|
bs.buffers[0] = bytes.NewBuffer(make([]byte, 0, 128)) // prepend
|
||||||
bs.buffers[1] = bytes.NewBuffer(make([]byte, 0, 128)) // append
|
bs.buffers[1] = bytes.NewBuffer(make([]byte, 0, 128)) // append
|
||||||
bs.buffers[2] = bytes.NewBuffer(make([]byte, 0, 256)) // filler
|
bs.buffers[2] = bytes.NewBuffer(make([]byte, 0, 256)) // filler
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -1110,7 +1110,7 @@ github.com/ulikunitz/xz/lzma
|
|||||||
github.com/vbatts/tar-split/archive/tar
|
github.com/vbatts/tar-split/archive/tar
|
||||||
github.com/vbatts/tar-split/tar/asm
|
github.com/vbatts/tar-split/tar/asm
|
||||||
github.com/vbatts/tar-split/tar/storage
|
github.com/vbatts/tar-split/tar/storage
|
||||||
# github.com/vbauerster/mpb/v8 v8.9.2
|
# github.com/vbauerster/mpb/v8 v8.9.3
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/vbauerster/mpb/v8
|
github.com/vbauerster/mpb/v8
|
||||||
github.com/vbauerster/mpb/v8/cwriter
|
github.com/vbauerster/mpb/v8/cwriter
|
||||||
|
Reference in New Issue
Block a user