Missing method to expose Campaign.keyRevision to SDK consumers
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 546
- Forks
- 76
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 13
Description
Hi, I was playing around with this SDK to help perform leader election & coordination for my own project. After a leader has been elected (through Election.campaign), I believe keyRevision of Campaign should be available for the client.
According to the concurrency API reference, when leaders write data to etcd, they should use the leader revision number to check if their leadership still holds, to help avoid split-brain situations.
revis the creation revision of the key. It can be used to test for ownership of an election during transactions by testing the key’s creation revision matches rev
The Go client exposes the revision number in the Election struct. Currently, Campaign supports getCampaignKey, but there is no way to get the revision (other than something like (campaign as any).keyRevision).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Campaign implementation behind Election.campaign and its existing getCampaignKey support. Confirm how keyRevision is currently stored, then expose it to SDK consumers without a type cast; done when callers can read the campaign's revision through the public API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100