Update dependencies

This commit is contained in:
cuigh 2022-04-21 14:17:23 +08:00
parent d90ad871b0
commit e89fe3b80d
3 changed files with 452 additions and 40 deletions

View File

@ -106,6 +106,7 @@ func (d *Docker) fillStatus(ctx context.Context, c *client.Client, services []sw
// count tasks // count tasks
for _, task := range tasks { for _, task := range tasks {
s := m[task.ServiceID] s := m[task.ServiceID]
if s != nil {
if s.Spec.Mode.Global != nil && task.DesiredState != swarm.TaskStateShutdown { if s.Spec.Mode.Global != nil && task.DesiredState != swarm.TaskStateShutdown {
s.ServiceStatus.DesiredTasks++ s.ServiceStatus.DesiredTasks++
} }
@ -113,6 +114,7 @@ func (d *Docker) fillStatus(ctx context.Context, c *client.Client, services []sw
s.ServiceStatus.RunningTasks++ s.ServiceStatus.RunningTasks++
} }
} }
}
return return
} }

13
go.mod
View File

@ -3,22 +3,27 @@ module github.com/cuigh/swirl
go 1.16 go 1.16
require ( require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/boltdb/bolt v1.3.1 github.com/boltdb/bolt v1.3.1
github.com/containerd/containerd v1.5.9 // indirect github.com/containerd/containerd v1.6.2 // indirect
github.com/cuigh/auxo v0.0.0-20211213084008-60eb7f7752a7 github.com/cuigh/auxo v0.0.0-20211213084008-60eb7f7752a7
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v20.10.9+incompatible github.com/docker/docker v20.10.9+incompatible
github.com/docker/go-connections v0.4.0 github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.4.0 github.com/docker/go-units v0.4.0
github.com/gobwas/ws v1.1.0 github.com/gobwas/ws v1.1.0
github.com/imdario/mergo v0.3.12 github.com/imdario/mergo v0.3.12
github.com/jinzhu/copier v0.3.2 github.com/jinzhu/copier v0.3.2
github.com/klauspost/compress v1.15.1 // indirect
github.com/mattn/go-shellwords v1.0.12 github.com/mattn/go-shellwords v1.0.12
github.com/mitchellh/mapstructure v1.4.3 github.com/mitchellh/mapstructure v1.4.3
github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0 github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.26.0 github.com/prometheus/common v0.30.0
go.mongodb.org/mongo-driver v1.8.2 go.mongodb.org/mongo-driver v1.8.2
golang.org/x/net v0.0.0-20211008194852-3b03d305991f // indirect golang.org/x/net v0.0.0-20220420153159-1850ba15e1be // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
google.golang.org/genproto v0.0.0-20220420195807-44278fea765b // indirect
gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 v2.4.0
) )

467
go.sum

File diff suppressed because it is too large Load Diff