awslabs / dynein

DynamoDB CLI written in Rust.
https://github.com/awslabs/dynein
Apache License 2.0
360 stars 37 forks source link

Add the configure option for retries, which is easier to understand #225

Open StoneDot opened 4 months ago

StoneDot commented 4 months ago

As discussed in https://github.com/awslabs/dynein/pull/196#discussion_r1531541167, the current retry configuration can be improved to be easily understood and written. The following is the current configuration.

retry:
  default:
    initial_backoff:
      secs: 0
      nanos: 500000000

We can improve it using enum with untagged. For instance, the following is the potential acceptable configuration.

retry:
  default:
    initial_backoff: 0.5 # This means 500 ms
retry:
  default:
    initial_backoff: 0.1s # This means 500 ms
retry:
  default:
    initial_backoff: 100ms