Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands: add consistency flags #186

Merged
merged 1 commit into from
Jan 13, 2023
Merged

commands: add consistency flags #186

merged 1 commit into from
Jan 13, 2023

Conversation

jzelinskie
Copy link
Member

@jzelinskie jzelinskie commented Jan 13, 2023

This adds flags for requests that can specify consistency.

zed permission check document:firstdoc reader user:jimmy --consistency-min-latency
zed permission check document:firstdoc reader user:jimmy --consistency-full
zed permission check document:firstdoc reader user:jimmy --consistency-at-least GhUKEzE2NzM1OTQzOTg2Mjc3MTkwMDA=
zed permission check document:firstdoc reader user:jimmy --consistency-at-exactly GhUKEzE2NzM1OTQzOTg2Mjc3MTkwMDA=

Fixes #37

var ErrMultipleConsistencies = errors.New("provided multiple consistency flags")

func registerConsistencyFlags(flags *pflag.FlagSet) {
flags.String("consistency-at-exactly", "", "evaluate at the provided snapshot")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should say provided zedtoken or somesuch

Copy link
Member

@josephschorr josephschorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jzelinskie jzelinskie merged commit a0603ec into main Jan 13, 2023
@jzelinskie jzelinskie deleted the consistency branch January 13, 2023 17:09
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement flag for consistency options
2 participants