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

How to read past version of keys #152

Open
namnhcntt opened this issue Jul 19, 2022 · 2 comments
Open

How to read past version of keys #152

namnhcntt opened this issue Jul 19, 2022 · 2 comments

Comments

@namnhcntt
Copy link

Is your feature request related to a problem? Please describe.
I cannot find any doc about read past version of keys.

Describe the solution you'd like
In etcdctl:

etcdctl get --prefix --rev=4 foo # access the versions of keys at revision 4

So how can do the same with dotnet-etcd?

Additional context
I'm using latest version of dotnet etcd for now (5.2.1), .NET Core 6.
Thanks

@setood
Copy link
Contributor

setood commented Aug 16, 2022

var kv = client.Get(
  new RangeRequest
  {
    Key = ByteString.CopyFromUtf8("foo"),
    RangeEnd = ByteString.CopyFromUtf8(dotnet_etcd.EtcdClient.GetRangeEnd("foo")),
    Revision = 4
  });

@shubhamranjan
Copy link
Owner

Yep, docs are not updated yet. I am currently working on revamping the lib from scratch to figure out the connection reliability issues. especially the ones related to watch. I try my best to keep things updated from whatever time I get.

Until then, as @setood figured it out. You can figure it by using your IDE's intellisense by looking at what params are available. I have exposed every param for every method given by etcd's grpc api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants