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

Add debug channel callbacks #52

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jan 9, 2025

Motivation:

Sometimes it can be useful to modify the channel pipeline or inspect the channel when debugging. v1 has hooks to allow users to do this which proved helpful a number of times. v2 should offer similar behaviour.

Modifications:

  • Add 'DebugChannelCallbacks' to the client and server config and wire them up appropriately.
  • Add tests. Extract 'TransportKind' from some tests as it was being recreated a number of times.

Result:

Users can modify the channel pipeline if they need to.

@glbrntt glbrntt added the 🆕 semver/minor Adds new public API. label Jan 9, 2025
@glbrntt glbrntt requested a review from gjcairo January 9, 2025 10:25
Motivation:

Sometimes it can be useful to modify the channel pipeline or inspect the
channel when debugging. v1 has hooks to allow users to do this which
proved helpful a number of times. v2 should offer similar behaviour.

Modifications:

- Add 'DebugChannelCallbacks' to the client and server config and wire
  them up appropriately.
- Add tests. Extract 'TransportKind' from some tests as it was being
  recreated a number of times.

Result:

Users can modify the channel pipeline if they need to.
@glbrntt
Copy link
Collaborator Author

glbrntt commented Jan 9, 2025

API breakages are expected; we added new parameters to these:

  💔 API breakage: constructor HTTP2ClientTransport.Posix.Config.init(http2:backoff:connection:compression:) has been removed
  💔 API breakage: constructor HTTP2ServerTransport.Posix.Config.init(http2:rpc:connection:compression:) has been removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant