(flags *pflag.FlagSet, options *swarmOptions)
| 222 | } |
| 223 | |
| 224 | func 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 | |
| 234 | func (o *swarmOptions) mergeSwarmSpec(spec *swarm.Spec, flags *pflag.FlagSet, caCert *string) { |
| 235 | if flags.Changed(flagTaskHistoryLimit) { |
no test coverage detected
searching dependent graphs…