Roblox / rs-consul

This crate provides access to a set of strongly typed apis to interact with consul (https://www.consul.io/)
MIT License
36 stars 23 forks source link

wrap read_key in a ResponseMeta so callers can access the index #48

Closed badalex closed 3 months ago

badalex commented 3 months ago

when a delete occurs we need this index as the ModifyIndex of all the ReadKeyResponses will still be the same (and lower). which causes blocking requests to be "broken" as future read_key request immediatly returns until either a new key, or a update occuries to a key contained in the ReadKeyResponse Vec.

per Roblox/rs-consul#30

Checks

Please check these off before promoting the pull request to non-draft status.

github-actions[bot] commented 3 months ago

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

badalex commented 3 months ago

I have read the CLA Document and I hereby sign the CLA

kushudai commented 3 months ago

Hi @badalex Thank you for explaining the problem better in #30 and this change! I was hoping you could update a test as well to verify the index is correctly returned? i.e. do a repeated read and verify index does not change. And read, update read and verify the index does increase?

EDIT: Nvm, I can take care of this.