feat: add drop-non-retryable-data to replications commands (#330)

* feat: add drop-non-retryable-data to replications commands

* refactor: use drop vs nodrop flags

* chore: use the built-in PtrBool
This commit is contained in:
William Baker
2021-11-17 14:16:58 -07:00
committed by GitHub
parent 6a7c4f6d44
commit f32a55f3bf
7 changed files with 252 additions and 35 deletions

View File

@ -76,6 +76,16 @@ func newReplicationCreateCmd() cli.Command {
Value: 67108860, // source: https://github.com/influxdata/openapi/blob/588064fe68e7dfeebd019695aa805832632cbfb6/src/oss/schemas/ReplicationCreationRequest.yml#L19
Destination: &params.MaxQueueSize,
},
&cli.BoolFlag{
Name: "drop-non-retryable-data",
Usage: "Drop data when a non-retryable error is encountered instead of retrying",
Destination: &params.DropNonRetryableData,
},
&cli.BoolFlag{
Name: "no-drop-non-retryable-data",
Usage: "Do not drop data when a non-retryable error is encountered",
Destination: &params.NoDropNonRetryableData,
},
),
Action: func(ctx *cli.Context) error {
api := getAPI(ctx)
@ -209,6 +219,16 @@ func newReplicationUpdateCmd() cli.Command {
Usage: "New max queue size in bytes",
Destination: &params.MaxQueueSize,
},
&cli.BoolFlag{
Name: "drop-non-retryable-data",
Usage: "Drop data when a non-retryable error is encountered instead of retrying",
Destination: &params.DropNonRetryableData,
},
&cli.BoolFlag{
Name: "no-drop-non-retryable-data",
Usage: "Do not drop data when a non-retryable error is encountered",
Destination: &params.NoDropNonRetryableData,
},
),
Action: func(ctx *cli.Context) error {
api := getAPI(ctx)