consul: Adding consistent read enforcement

This commit is contained in:
Armon Dadgar 2014-04-21 11:49:21 -07:00
parent e706c988b8
commit e5e97274d4
1 changed files with 7 additions and 0 deletions

View File

@ -244,6 +244,13 @@ RUN_QUERY:
// Update the query meta data
s.setQueryMeta(m)
// Check if query must be consistent
if b.RequireConsistent {
if err := s.consistentRead(); err != nil {
return err
}
}
// Run the query function
err := run()