feat: add max age to replications create and update (#367)

This commit is contained in:
Dane Strandboge
2022-03-18 17:21:12 -05:00
committed by GitHub
parent c8c7c1c680
commit 88ba3464cd
6 changed files with 90 additions and 3 deletions

View File

@ -72,7 +72,7 @@ func newReplicationCreateCmd() cli.Command {
&cli.Int64Flag{
Name: "max-queue-bytes",
Usage: "Max queue size in bytes",
Value: 67108860, // source: https://github.com/influxdata/openapi/blob/588064fe68e7dfeebd019695aa805832632cbfb6/src/oss/schemas/ReplicationCreationRequest.yml#L19
Value: 67108860, // source: https://github.com/influxdata/openapi/blob/master/src/oss/schemas/ReplicationCreationRequest.yml
Destination: &params.MaxQueueSize,
},
&cli.BoolFlag{
@ -85,6 +85,12 @@ func newReplicationCreateCmd() cli.Command {
Usage: "Do not drop data when a non-retryable error is encountered",
Destination: &params.NoDropNonRetryableData,
},
&cli.Int64Flag{
Name: "max-age",
Usage: "Specify a maximum age (in seconds) for replications data before it is dropped, or 0 for infinite",
Value: 604800, // source: https://github.com/influxdata/openapi/blob/master/src/oss/schemas/ReplicationCreationRequest.yml
Destination: &params.MaxAge,
},
),
Action: func(ctx *cli.Context) error {
api := getAPI(ctx)
@ -228,6 +234,11 @@ func newReplicationUpdateCmd() cli.Command {
Usage: "Do not drop data when a non-retryable error is encountered",
Destination: &params.NoDropNonRetryableData,
},
&cli.Int64Flag{
Name: "max-age",
Usage: "Specify a maximum age (in seconds) for replications data before it is dropped, or 0 for infinite",
Destination: &params.MaxAge,
},
),
Action: func(ctx *cli.Context) error {
api := getAPI(ctx)