MCPcopy Create free account
hub / github.com/docker/cli / addSwarmFlags

Function addSwarmFlags

cli/command/swarm/opts.go:224–232  ·  view source on GitHub ↗
(flags *pflag.FlagSet, options *swarmOptions)

Source from the content-addressed store, hash-verified

222}
223
224func addSwarmFlags(flags *pflag.FlagSet, options *swarmOptions) {
225 flags.Int64Var(&options.taskHistoryLimit, flagTaskHistoryLimit, 5, "Task history retention limit")
226 flags.DurationVar(&options.dispatcherHeartbeat, flagDispatcherHeartbeat, 5*time.Second, "Dispatcher heartbeat period (ns|us|ms|s|m|h)")
227 flags.Uint64Var(&options.maxSnapshots, flagMaxSnapshots, 0, "Number of additional Raft snapshots to retain")
228 flags.SetAnnotation(flagMaxSnapshots, "version", []string{"1.25"})
229 flags.Uint64Var(&options.snapshotInterval, flagSnapshotInterval, 10000, "Number of log entries between Raft snapshots")
230 flags.SetAnnotation(flagSnapshotInterval, "version", []string{"1.25"})
231 addSwarmCAFlags(flags, &options.swarmCAOptions)
232}
233
234func (o *swarmOptions) mergeSwarmSpec(spec *swarm.Spec, flags *pflag.FlagSet, caCert *string) {
235 if flags.Changed(flagTaskHistoryLimit) {

Callers 2

newUpdateCommandFunction · 0.85
newInitCommandFunction · 0.85

Calls 1

addSwarmCAFlagsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…