Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: JustinDFuller/nozzle

Tags

v0.0.9

Toggle v0.0.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: Make OnStateChange callbacks non-blocking (#33)

* fix: make OnStateChange callbacks non-blocking

The OnStateChange callback was executed synchronously while holding
the mutex, which could delay the ticker and block all nozzle
operations if the callback was slow.

Changes:
- Execute callbacks asynchronously in separate goroutines
- Add context.Context parameter for cancellation support
- Add Timestamp field to StateSnapshot to record when changes occur
- Add panic recovery to prevent callback panics from crashing
- Update all tests and examples for new callback signature
- Add comprehensive tests for async behavior

This is a breaking change to the callback signature but fixes the
blocking issue completely.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* docs: remove breaking change notices per v0 status

This is a v0 library, so breaking changes are expected.
Removed explicit breaking change notices from documentation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* docs: simplify context cancellation check in examples

Use ctx.Err() != nil instead of select statement for one-off
context cancellation checks. This is simpler and more idiomatic.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* fix: resolve linter errors

- Use underscore for unused parameters in callbacks
- Rename short variable names (mu -> mutex)
- Add proper error handling for Close() calls
- Remove unused Timestamp.IsZero() check

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* fix: resolve linter errors in test files

- Rename short variable 'n' to 'noz' throughout test files
- Add required whitespace before defer statements per wsl linter
- Fix all golangci-lint warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>

v0.0.8

Toggle v0.0.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Examples (#9)

* fix examples

* cover

* remove unused

v0.0.7

Toggle v0.0.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
OnStateChange gets a whole Nozzle in callback (#7)

v0.0.6

Toggle v0.0.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update README.md (#6)

v0.0.5

Toggle v0.0.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fixing concurrency errors (#2)

* fixing concurrency errors

* Makefile

* working on logic

* tests

* fixes

* fix

* fix

* fix

---------

Co-authored-by: Justin Fuller <[email protected]>

v0.0.4

Toggle v0.0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update README.md

v0.0.3

Toggle v0.0.3's commit message
Examples

v0.0.2

Toggle v0.0.2's commit message
format

v0.0.1

Toggle v0.0.1's commit message
docs

v0.0.0

Toggle v0.0.0's commit message
Docs