nats-io/natscli

Enable inactive-threshold flag while editing consumer

yeqown opened this issue · 2 comments

Proposed change

--inactive-threshold=THRESHOLD flag invisible for nats con edit -h, therefore it's not available for the edit subcommand.
Refer to the https://docs.nats.io/nats-concepts/jetstream/consumers#general, it marks InactiveThreshold editable, natscli should provide the ability to edit consumer's InactiveThreshold too.

Use case

Can edit the inactive-threshold attributes by natscli easily rather than coding with client SDK.

Contribution

Yes

Easy fix, just move this line out of the edit check, in case you wanted to do a PR?

f.Flag("inactive-threshold", "How long to allow an ephemeral consumer to be idle before removing it").PlaceHolder("THRESHOLD").DurationVar(&c.inactiveThreshold)

@ripienaar yup, I'd like to open A PR for this, and I've tested locally.