Skip to content

feat(configwatcher): add write-through methods#868

Merged
zeevdr merged 3 commits into
mainfrom
feat/17-configwatcher-write-through
Jun 5, 2026
Merged

feat(configwatcher): add write-through methods#868
zeevdr merged 3 commits into
mainfrom
feat/17-configwatcher-write-through

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented Jun 5, 2026

Summary

  • The configwatcher was read-only; applications that wanted to write a config value had to maintain a separate configclient reference.
  • Added SetString, SetBool, SetInt, SetFloat methods to Watcher that write to the server via the transport and optimistically update the local Value cache immediately, without waiting for the subscription to deliver the change.
  • Added WithDescription and WithExpectedChecksum write options.

Test plan

  • go test ./... passes in sdk/configwatcher
  • Write a value, verify Value.Get() returns new value immediately
  • Write with wrong checksum returns concurrency error from server

Closes #17

@zeevdr zeevdr added enhancement New feature or request sdk SDK changes size: L Larger effort — multiple days, design decisions needed priority: P2 Nice-to-have labels Jun 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sdk/configwatcher/write.go 85.71% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@zeevdr zeevdr merged commit a0384e6 into main Jun 5, 2026
21 checks passed
@zeevdr zeevdr deleted the feat/17-configwatcher-write-through branch June 5, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: P2 Nice-to-have sdk SDK changes size: L Larger effort — multiple days, design decisions needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configwatcher write-through

1 participant