Skip to content

refactor: consolidate stream-wrapper types into internal/grpcutil#389

Merged
zeevdr merged 3 commits into
mainfrom
issue-297-grpcutil-stream-wrappers
May 14, 2026
Merged

refactor: consolidate stream-wrapper types into internal/grpcutil#389
zeevdr merged 3 commits into
mainfrom
issue-297-grpcutil-stream-wrappers

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented May 14, 2026

Summary

  • Three packages (auth/jwt, auth/metadata, server) each defined a private struct to override a gRPC ServerStream's context. All three were structurally identical — embed grpc.ServerStream, store a context.Context, override Context().
  • Consolidating into a single grpcutil.WrappedStream (with a NewWrappedStream constructor) eliminates the duplication and gives future interceptors a single well-known type to use or extend.

Test plan

  • All existing make test tests pass — the change is purely structural, with no behavioral difference.
  • make lint passes (gofumpt, golangci-lint).

Closes #297

🤖 Generated with Claude Code

…pcutil

Three packages (auth/jwt, auth/metadata, server) each defined their own
private struct to override a gRPC ServerStream's context. All three were
structurally identical. This introduces a single grpcutil.WrappedStream
with a NewWrappedStream constructor and replaces all three local copies.

Co-Authored-By: Claude <noreply@anthropic.com>
Closes #297
@zeevdr zeevdr added this to the v0.11.0-alpha.2 milestone May 14, 2026
@zeevdr zeevdr added enhancement New feature or request server Server changes size: S Quick win — a few hours or less priority: P2 Nice-to-have labels May 14, 2026
@zeevdr zeevdr enabled auto-merge (squash) May 14, 2026 16:07
@zeevdr zeevdr merged commit 8568a44 into main May 14, 2026
17 of 18 checks passed
@zeevdr zeevdr deleted the issue-297-grpcutil-stream-wrappers branch May 14, 2026 16:10
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 server Server changes size: S Quick win — a few hours or less

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate stream-wrapper types into internal/grpcutil

1 participant