python-consul2 icon indicating copy to clipboard operation
python-consul2 copied to clipboard

Add consistency support to Health endpoints

Open ciscopony opened this issue 4 years ago • 0 comments

This is a "To-Do" in the current code, I've tested adding:

def ENDPOINT(self, ... consistency=None): ... consistency = consistency or self.agent.consistency if consistency in ('consistent', 'stale'): params.append((consistency, '1'))
...

To the ENDPOINT=service/checks/state/node blocks and it appears to work, I'd be happy to submit a PR. Having this functionality would help with a performance issue we hit occasionally during cluster leadership changes.

ciscopony avatar Jun 24 '21 19:06 ciscopony