grpc: move different type RPC handling out of underlying stream implementations (#9226)
This PR refactors and extracts stream-type-specific logic into a dedicated interceptor and stream wrapper to simplify the underlying stream transport implementations and also simplify these xDS http filter implementations. - Introduced `clientStreamWrapper`: Added a wrapper in `stream.go` that intercepts `SendMsg`, `CloseSend`, and `RecvMsg`. It inspects the `StreamDesc` to conditionally apply specific behaviors, like converting `io.EOF` to nil on `SendMsg` for non-client-streaming RPCs, auto-calling CloseSend, and checking for cardinality violations after receiving a message in non-server-streaming RPCs. - Added `defaultStreamInterceptor`: Created a default interceptor that applies this wrapper to all client streams. - Registered the Default Interceptor: Updated `chainStreamClientInterceptors` in `clientconn.go` to prepend `defaultStreamInterceptor` to the interceptor chain. - Cleaned up `call.go` and internal streams: Removed the now-redundant EOF checking, Recv calls and cardinality checks from the lower-level transport functions in `stream.go` RELEASE NOTES: None
E
eshitachandwani committed
081051cebab0e4e0a7dc3fbd35c67770959cdb67
Parent: 506edc4
Committed by GitHub <noreply@github.com>
on 7/22/2026, 5:22:43 AM