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

Method Mode

cli/command/service/formatter.go:658–671  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656}
657
658func (c *serviceContext) Mode() string {
659 switch {
660 case c.service.Spec.Mode.Global != nil:
661 return "global"
662 case c.service.Spec.Mode.Replicated != nil:
663 return "replicated"
664 case c.service.Spec.Mode.ReplicatedJob != nil:
665 return "replicated job"
666 case c.service.Spec.Mode.GlobalJob != nil:
667 return "global job"
668 default:
669 return ""
670 }
671}
672
673func (c *serviceContext) Replicas() string {
674 s := &c.service

Callers 10

maxReplicasMethod · 0.95
ValidateOutputPathFunction · 0.80
localContentSizeFunction · 0.80
importZipFunction · 0.80
TestLoadDanglingSymlinkFunction · 0.80
TestSaveWithSymlinkFunction · 0.80
copyFilePermissionsFunction · 0.80
getPrivKeyBytesFromPathFunction · 0.80

Calls

no outgoing calls

Tested by 4

TestLoadDanglingSymlinkFunction · 0.64
TestSaveWithSymlinkFunction · 0.64