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

Function newServiceOptions

cli/command/service/opts.go:604–622  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

602}
603
604func newServiceOptions() *serviceOptions {
605 return &serviceOptions{
606 labels: opts.NewListOpts(opts.ValidateLabel),
607 constraints: opts.NewListOpts(nil),
608 containerLabels: opts.NewListOpts(opts.ValidateLabel),
609 env: opts.NewListOpts(opts.ValidateEnv),
610 envFile: opts.NewListOpts(nil),
611 groups: opts.NewListOpts(nil),
612 logDriver: newLogDriverOptions(),
613 dns: opts.NewListOpts(opts.ValidateIPAddress),
614 dnsOption: opts.NewListOpts(nil),
615 dnsSearch: opts.NewListOpts(opts.ValidateDNSSearch),
616 hosts: opts.NewListOpts(opts.ValidateExtraHost),
617 sysctls: opts.NewListOpts(nil),
618 capAdd: opts.NewListOpts(nil),
619 capDrop: opts.NewListOpts(nil),
620 ulimits: *opts.NewUlimitOpt(nil),
621 }
622}
623
624func (options *serviceOptions) ToServiceMode() (swarm.ServiceMode, error) {
625 serviceMode := swarm.ServiceMode{}

Callers 8

TestToServiceNetworkFunction · 0.85
TestToServicePidsLimitFunction · 0.85
TestToServiceSysCtlsFunction · 0.85
newUpdateCommandFunction · 0.85
newCreateCommandFunction · 0.85
newRollbackCommandFunction · 0.85

Calls 1

newLogDriverOptionsFunction · 0.85

Tested by 5

TestToServiceNetworkFunction · 0.68
TestToServicePidsLimitFunction · 0.68
TestToServiceSysCtlsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…