influxdb-rust icon indicating copy to clipboard operation
influxdb-rust copied to clipboard

feat: added retention policy for v2 api

Open stegaBOB opened this issue 1 year ago • 1 comments
trafficstars

Description

Added the ability to add a retention policy to the client parameters. Mainly for v2 compatibility, which uses the retention policy to map to bucket names https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/dbrp/

Checklist

  • [x] Formatted code using cargo fmt --all
  • [x] Linted code using clippy
    • [x] with reqwest feature: cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features use-serde,derive,reqwest-client -- -D warnings
    • [x] with surf feature: cargo clippy --manifest-path influxdb/Cargo.toml --all-targets --no-default-features --features use-serde,derive,hyper-client -- -D warnings
  • [x] Updated README.md using cargo doc2readme -p influxdb --expand-macros
  • [x] Reviewed the diff. Did you leave any print statements or unnecessary comments?
  • [x] Any unfinished work that warrants a separate issue captured in an issue with a TODO code comment

Note: Method of chrono got deprecated which is causing some linting to fail, but that's unrelated to this PR.

stegaBOB avatar Jan 19 '24 00:01 stegaBOB

Hello,

thanks for your contribution. Could you please also add tests for your feature?

Empty2k12 avatar Feb 01 '24 14:02 Empty2k12