MCPcopy Index your code
hub / github.com/docker/cli / globalJobProgressUpdater

Struct globalJobProgressUpdater

cli/command/service/progress/progress.go:712–727  ·  view source on GitHub ↗

globalJobProgressUpdater is the progressUpdater for GlobalJob-mode services. Because GlobalJob services are so much simpler than ReplicatedJob services, this updater is in turn simpler as well.

Source from the content-addressed store, hash-verified

710// Because GlobalJob services are so much simpler than ReplicatedJob services,
711// this updater is in turn simpler as well.
712type globalJobProgressUpdater struct {
713 progressOut progress.Output
714
715 // initialized is used to detect the first pass of update, and to perform
716 // first time initialization logic at that time.
717 initialized bool
718
719 // total is the total number of tasks expected for this job
720 total int
721
722 // progressDigits is the number of spaces to pad the numerator of the job
723 // progress field
724 progressDigits int
725
726 taskNodes map[string]struct{}
727}
728
729func (u *globalJobProgressUpdater) update(service swarm.Service, tasks []swarm.Task, activeNodes map[string]struct{}, _ bool) (bool, error) {
730 if !u.initialized {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected